When you hit the on switch of your computer, nothing seems to be happening for a few seconds. But your computer is really going through a complex set of operations to see if all its components are working properly and to warn you if something's wrong. This is the first step of the process called booting up. The POST is the first thing that runs when your computer turns on. It gives a combination of different beeps when there is something wrong with one of the components in your computers. When the POST check has passed, the computer gives one beep, which means everything is all right. CIRCUIT will explain the entire Power-On-Self-Test.
The boot program on the ROM BIOS chip checks drive A to see if there is a system disk. If there isn't, it starts booting from the hard disk. The program searches for two hidden files called IO.SYS and MS-DOS.SYS on MS-DOS systems. On IBM systems, it searches for IBMDOS.COM and IBMBIO.COM.
The boot program reads the first sector of the disk and copies it to RAM at the hexadecimal address 7C00. This information is the DOS boot record, which is 512 bytes, and it has code to initiate the two hidden files. After the boot record has been copied to RAM, the BIOS passes control to the boot record by branching to that address.
The boot record starts controlling the PC and loads IO.SYS into RAM. This file contains extensions to the ROM BIOS and also has a routine called SYSINIT, which takes over the rest of the boot-up. After IO.SYS is loaded, the boot record in RAM is no longer needed, and is replaced by other code.
SYSINIT now takes control over boot-up, and it loads MSDOS.SYS into RAM. MSDOS.SYS works with BIOS in managing files, executing programs, and responding to signals from hardware.
Under DOS, SYSINIT searches the root directory for the file CONFIG.SYS. SYSINIT then tells MSDOS.SYS to execute the commands in the file. CONFIG.SYS is a file created by the user, and it tells the operating system how to handle certain operations, such as how many files can be open at one time. This file may also contain instructions on loading device drivers, which are files that extend the capabilities of BIOS to manage memory or hardware devices.
Next, SYSINIT commands MSDOS.SYS to load the file COMMAND.COM. This is an operating system file, and it contains three major parts. One is an extension to I/O functions, and this part is loaded in memory with BIOS, becoming part of the operating system.
The next part of COMMAND.COM contains DOS commands, such as COPY and EDIT. Finally, the third part of COMMAND.COM searches the root directory for a file called AUTOEXEC.BAT. This file is created by the user, and it contains different batch files and programs that the computer executes each time it is turned on. The PC has now booted, and can be used.
When installing new hardware to your computer, you have to make sure that it is not in conflict with any other devices. Components need to communicate with the processor and other components, and there are only a few channels of communication. These channels are called system resources. One resource is a Direct Memory Access (DMA), which gives the component access to RAM. The other resource is called an Interrupt Request Query (IRQ), which interrupts whatever the processor is doing and makes it look at the request the component has. Each component must have a its own DMA and IRQ channel if the computer is to function properly. Plug and Play prevents devices from having the same resources, which would cause conflict. If every device in your PC has the Plug and Play standard, the PC's BIOS, system software, and the devices work together to make sure there is no conflict with a system resource.
When a Plug and Play PC is turned on, the BIOS searches for all the necessary devices it needs, such as keyboards, video cards, and RAM, which are necessary for the PC to work properly. The BIOS then passes control to the operating system.
The operating system executes drivers called enumerators, which are programs which act as an interface between the operating system and different devices. There are different kinds of enumerators, such as bus enumerators and port enumerators. Each enumerator identifies which device its going to control and what system resources it needs.
This information is stored in a database in RAM called a hardware tree. After storing the information in the tree, the operating system examines the hardware tree and decides what resources to give to each device. Then it tells the enumerators what it allocated for their respective devices. The resource allocation information is stored in the enumerators programmable registers (memory).
Lastly, the system loads all necessary device drivers, and it tells each device driver which resources it is using. Device drivers are code for the operating system which tell it how to communicate with a certain piece of hardware. The device drivers load their respective devices, and the system is finished booting.