Friday, October 24, 2008

Understanding System Booting

The procedure of starting a computer by loading the kernel is known as booting the system.In general every computer system has a small piece of code known as bootstrap program or bootstrap loader whose main task is to locate the kernel then load it into main memory and starts its execution.In some computers this process takes place in two steps in which in the first step a simple bootstrap loader fetches the more complex program boot program from the disk, which in turn loads the kernel(2nd step).Whenever any computer is powered or rebooted,the instruction register is loaded with a predefined location(at which bootstrap program is present),and execution starts their.This bootstrap program is in the form of Read Only Memory because RAM is in an unknown state at start up and in addition to this ROM is virus free because it is read only.In addition to this a bootstrap program perform a variety of task like to run diagnostics to check the state of machine.If the diagnostics is successful then the program is continued with booting steps.

All small application devices like cellular phones,PDA's and game consoles store their operating system in ROM.It is always recommended to store small operating system in ROM.But in the case of large operating system like Windows,Linux and Mac OS X or for the systems that change frequently,the bootstrap loader program is stored in firmware(ROM) and operating system is on disk. In this case the bootstrap runs diagnostics and has a bit of code that can read a single block at the fixed location from disk into memory and execute the code from that boot block.The program stored in the boot block may be sophisticated enough to load the entire the operating system into memory and begin its execution.Now after that full bootstrap program is loaded and it can traverse the file system to find the operating system kernel load it into memory and start its execution and at this point we can say that system is running.

0 comments: