PC process

Computer architecture topics
Post Reply
User avatar
Face
Major
Major
Posts: 727
Joined: Thu Feb 18, 2010 5:06 pm
Location: SRI LANKA.KANDY.

PC process

Post by Face » Fri Apr 09, 2010 7:53 pm

PC process.

I learn about PC process in my class.I'm asking over my class syllabus.because I love to learn more about those topics.

These are my questions about PC PROCESS.
steps of PC PROCESS...

1.POST(Power On Self Test)-It is in ROM chips in the motherboard..is it only to check whether the hardware working..?what are the hardware components it checks..?

2.BIOS-(Basic Input Output System)-It is also in ROM chip.What it contain..What it do?Is it only to start Hard disk..?or any thing else..

3.BOOTSTRAP-load OS from the hard disk to main memory..I don't have any idea about this.What are the files it load..?explain about this a little.Not much..little basics.

In 1 & 2 question , I entered some details from my Note book.because I post a link to NIBM DCSD learning guide topic to NIBM friends.I think that those details will help them to understand the questions...
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: PC process

Post by Neo » Sat Apr 10, 2010 6:21 am

First, I will start with a small description. Your question is related to parts of the bootstrapping process.

In computing, booting (also known as "booting up") is a bootstrapping process that starts operating systems when the user turns on a computer system. A boot sequence is the initial set of operations that the computer performs when power is switched on. The bootloader typically loads the main operating system for the computer.

Note that BIOS is a software program (firmware) stored in the ROM. BIOS has th ecode to do POST and Bootstrapping.

The bootstrapping process begins with the CPU executing BIOS (software code) contained in ROM which is at a predefined address. This software contains rudimentary functionality to search for devices eligible to participate in booting, and load a small program from a special section (most commonly the boot sector) of the most promising device.

The BIOS Program
In order for any computer to function, it must have software to run on it. All that a processor--or any hardware for that matter--knows how to do is to follow instructions. The software is that collection of instructions, as described in this part of the Introduction. All regular programs that you run on your PC are stored permanently on your hard disk, and are loaded into your system memory (RAM) when you need to use them. From the memory, the processor can access the instructions coded into the program and run them, which lets you do your work.

When you first turn on your PC, the processor is "raring to go", but it needs some instructions to execute. However, since you just turned on the machine, your system memory is empty; there are no programs to run. To make sure that the BIOS program is always available to the processor, even when it is first turned on, it is "hard-wired" into a read-only-memory (ROM) chip that is placed on your motherboard.

A uniform standard was created between the makers of processors and the makers of BIOS programs, so that the processor would always look in the same place in memory to find the start of the BIOS program. The processor gets its first instructions from this location, and the BIOS program begins executing. The BIOS program then begins the system boot sequence which calls other programs, gets your operating system loaded, and your PC up and running.

The BIOS program is always located in a special reserved memory area, the upper 64K of the first megabyte of system memory (addresses F000h to FFFFh). Some BIOSes use more than this 64K area.

System Boot Sequence
The system BIOS is what starts the computer running when you turn it on. The following are the steps that a typical boot sequence involves. Of course this will vary by the manufacturer of your hardware, BIOS, etc., and especially by what peripherals you have in the PC. Here is what generally happens when you turn on your system power:
  1. The internal power supply turns on and initializes. The power supply takes some time until it can generate reliable power for the rest of the computer, and having it turn on prematurely could potentially lead to damage. Therefore, the chipset will generate a reset signal to the processor (the same as if you held the reset button down for a while on your case) until it receives the Power Good signal from the power supply.
  2. When the reset button is released, the processor will be ready to start executing. When the processor first starts up, it is suffering from amnesia; there is nothing at all in the memory to execute. Of course processor makers know this will happen, so they pre-program the processor to always look at the same place in the system BIOS ROM for the start of the BIOS boot program. This is normally location FFFF0h, right at the end of the system memory. They put it there so that the size of the ROM can be changed without creating compatibility problems. Since there are only 16 bytes left from there to the end of conventional memory, this location just contains a "jump" instruction telling the processor where to go to find the real BIOS startup program.
  3. The BIOS performs the power-on self test (POST). If there are any fatal errors, the boot process stops. POST beep codes can be found in this area of the Troubleshooting Expert.
  4. The BIOS looks for the video card. In particular, it looks for the video card's built in BIOS program and runs it. This BIOS is normally found at location C000h in memory. The system BIOS executes the video card BIOS, which initializes the video card. Most modern cards will display information on the screen about the video card. (This is why on a modern PC you usually see something on the screen about the video card before you see the messages from the system BIOS itself).
  5. The BIOS then looks for other devices' ROMs to see if any of them have BIOSes. Normally, the IDE/ATA hard disk BIOS will be found at C8000h and executed. If any other device BIOSes are found, they are executed as well.
  6. The BIOS displays its startup screen.
  7. The BIOS does more tests on the system, including the memory count-up test which you see on the screen. The BIOS will generally display a text error message on the screen if it encounters an error at this point; these error messages and their explanations can be found in this part of the Troubleshooting Expert.
  8. The BIOS performs a "system inventory" of sorts, doing more tests to determine what sort of hardware is in the system. Modern BIOSes have many automatic settings and will determine memory timing (for example) based on what kind of memory it finds. Many BIOSes can also dynamically set hard drive parameters and access modes, and will determine these at roughly this time. Some will display a message on the screen for each drive they detect and configure
    this way. The BIOS will also now search for and label logical devices (COM and LPT ports).
  9. If the BIOS supports the Plug and Play standard, it will detect and configure Plug and Play devices at this time and display a message on the screen for each one it finds. See here for more details on how PnP detects devices and assigns resources.
  10. The BIOS will display a summary screen about your system's configuration. Checking this page of data can be helpful in diagnosing setup problems, although it can be hard to see because sometimes it flashes on the screen very quickly before scrolling off the top.
  11. The BIOS begins the search for a drive to boot from. Most modern BIOSes contain a setting that controls if the system should first try to boot from the floppy disk (A:) or first try the hard disk (C:). Some BIOSes will even let you boot from your CD-ROM drive or other devices, depending on the boot sequence BIOS setting.
  12. Having identified its target boot drive, the BIOS looks for boot information to start the operating system boot process. If it is searching a hard disk, it looks for a master boot record at cylinder 0, head 0, sector 1 (the first sector on the disk); if it is searching a floppy disk, it looks at the same address on the floppy disk for a volume boot sector.
  13. If it finds what it is looking for, the BIOS starts the process of booting the operating system, using the information in the boot sector. At this point, the code in the boot sector takes over from the BIOS. The DOS boot process is described in detail here. If the first device that the system tries (floppy, hard disk, etc.) is not found, the BIOS will then try the next device in the boot sequence, and continue until it finds a bootable device.
  14. If no boot device at all can be found, the system will normally display an error message and then freeze up the system. What the error message is depends entirely on the BIOS, and can be anything from the rather clear "No boot device available" to the very cryptic "NO ROM BASIC - SYSTEM HALTED". This will also happen if you have a bootable hard disk partition but forget to set it active.
This process is called a "cold boot" (since the machine was off, or cold, when it started). A "warm boot" is the same thing except it occurs when the machine is rebooted using {Ctrl}+{Alt}+{Delete} or similar. In this case the POST is skipped and the boot process continues roughly at step 8 above.


1.POST(Power On Self Test)-It is in ROM chips in the motherboard..is it only to check whether the hardware working..?what are the hardware components it checks..?
First the correct name for this is BIOS POST and it is a part of BIOS firmware.

The first thing that the BIOS does when it boots the PC is to perform what is called the Power-On Self-Test, or POST for short. The POST is a built-in diagnostic program that checks your hardware to ensure that everything is present and functioning properly, before the BIOS begins the actual boot. It later continues with additional tests (such as the memory test that you see printed on the screen) as the boot process is proceeding.

The POST runs very quickly, and you will normally not even noticed that it is happening unless it finds a problem. You may have encountered a PC that, when turned on, made beeping sounds and then stopped without booting up. That is the POST telling you something is wrong with the machine. The speaker is used because this test happens so early on, that the video isn't even activated yet! These beep patterns can be used to diagnose many hardware problems with your PC. The exact patterns depend on the maker of the BIOS; the most common are Award and AMI BIOSes.

Note: Some POST errors are considered "fatal" while others are not. A fatal error means that it will halt the boot process immediately (an example would be if no system memory at all is found). In fact, most POST boot errors are fatal, since the POST is testing vital system components.

AWARD BIOS POST Beep error codes
  1. A single beep during the boot process, usually right before the BIOS startup screen is displayed, is normal and does not indicate a failure as long as the boot continues on.
  2. 1 Long Beep: Memory problem
    There is a failure of some sort related to the system memory. The first bank of memory probably has a failure of some sort; this is usually just a physical problem such as an incorrectly inserted module, but may also mean a bad memory chip in a module. It is possible that there is a failure related to the motherboard or a system device as well.
  3. 1 Long, then 2 Short Beeps: Video error
    The BIOS is unable to access the video system in order to write any error messages to the screen. This is usually caused by a problem with the video card, or the memory on the video card. It can also be a motherboard issue.
  4. 1 Long, then 3 Short Beeps: Video error
    The BIOS is unable to access the video system in order to write any error messages to the screen. This is usually caused by a problem with the video card, or the memory on the video card. It can also be a motherboard issue.
  5. Continuous Beeping: Memory or video problem
    The system is producing constant beeping in no specific pattern, or a fast "ringing" sound. This is usually caused by a problem with the system memory, or possibly the video card. The memory is more likely--the system complains long and loud if it can't find any usable memory, as there is no way to even start the boot process when this is the case. The motherboard itself could also be the problem.
2.BIOS-(Basic Input Output System)-It is also in ROM chip.What it contain..What it do?Is it only to start Hard disk..?or any thing else..
The system BIOS is the lowest-level software in the computer which is stored in ROM; it acts as an interface between the hardware (especially the chipset and processor) and the operating system. The BIOS provides access to the system hardware and enables the creation of the higher-level operating systems (DOS, Windows, Linux, etc.) that you use to run your applications. The BIOS is also responsible for allowing you to control your computer's hardware settings, for booting up the machine when you turn on the power or hit the reset button, and various other system functions.

3.BOOTSTRAP-load OS from the hard disk to main memory..I don't have any idea about this.What are the files it load..?explain about this a little.Not much..little basics.
After hardware checking and initialisation is done, having identified its target boot drive, the BIOS looks for boot information to start the operating system boot process. If it is searching a hard disk, it looks for a master boot record (MBR) at cylinder 0, head 0, sector 1 (the first sector on the disk: commonly called as Track 0); if it is searching a floppy disk, it looks at the same address on the floppy disk for a volume boot sector.

At this location we have a second-stage bootloader to boot the operating system. The common second stage bootloaders are GRUB, BOOTMGR, Syslinux, LILO and NTLDR.

Sample 2nd stage-Bootloader
The DOS Boot Process

The system boot sequence is the series of steps that the system performs when it is turned on (or rebooted with the reset switch, for example). This always starts with the special boot program software that is in the system BIOS ROM. The BIOS has several steps that it must perform to test the system and set it up, before any operating system can be loaded. These steps are described in detail here.

Once the BIOS has completed its startup activities, the last thing it does is to begin the process of loading the operating system. It does this by searching for a boot device containing boot code to which it can hand off the boot process. It will search for boot devices in the order specified by the BIOS setting that controls the boot sequence. If it cannot find a boot device it will terminate with an error.

Assuming that the BIOS finds a boot sector on a device, the process of loading the operating system begins. If the operating system is DOS, or any variant of Windows that starts out by booting the equivalent of DOS--which is all of them other than Windows NT or Windows 2000--then a specific operating system load sequence commences, which is normally called the DOS Boot Process. In the case of Windows, additional steps are added to the end of the process after the underlying DOS operating system has loaded.

The process below outlines how booting from the hard disk functions. Booting from the floppy disk differs only in the first few steps, because the floppy disk's structures are slightly different. Floppies cannot be partitioned, and hence have no master boot record or partitions. This means that the steps where the master boot record are searched are skipped.

Here are the steps in the DOS boot process:
  1. The BIOS, having completed its functions, loads the boot code in the master boot record and transfers control to it. The master boot record code begins execution. If the boot device is a floppy disk, the process continues with step 6.
    The master boot code examines the master partition table. It is searching for two things. First, it must determine if there is an extended DOS partition. Second, it must determine if there is a bootable partition specified in the partition table.
  2. If the master boot code finds an extended partition on the disk, it loads the extended partition table that describes the first logical volume in the extended partition. This extended partition table is examined to see if it points to another extended partition table. If it does, then that table contains information about the second logical volume in the extended partition, so it is loaded and examined. (Recall that logical volumes in the extended partition have their extended partition table chained one to the next.) This process is continued until all of the extended partitions have been loaded and recognized by the system.
  3. After loading the extended partition information (if any), the code attempts to boot the primary partition that is marked active (bootable). If there are no partitions marked active, then the boot process will terminate with an error. The error message is often the same one that occurs if the BIOS finds no boot device, and is generally something like "No boot device", but can be the infamous "NO ROM BASIC - SYSTEM HALTED".
    If there is a primary partition marked active, the code will boot it. The rest of the steps assume this is a DOS primary partition.
  4. The volume boot sector is loaded into memory and tested, and the boot code that it contains is given control of the remainder of the boot process.
  5. The volume boot code examines the structures on the disk that it is booting to ensure that everything is correct and in the right place. If not, the boot process will end in an error here as well.
  6. The code searches the root directory of the device being booted for the operating system files that contain the operating system. For a system running MS-DOS these are the files "IO.SYS", "MSDOS.SYS" and "COMMAND.COM".
  7. If the operating system files are not found, the boot program will display an error message, which is usually something like "Non-system disk or disk error - Replace and press any key when ready". Some people think that this message means the system was never booted, that the BIOS examined the floppy disk for example and just rejected it because it couldn't boot it. As you can see from this description of the boot process, the volume boot code was indeed loaded and executed, and in fact it is what prints the message when it can't find the operating system files! See here for an explanation of why this distinction is so important.
  8. If the operating system files are found, the boot program will load them into memory and transfer control to them. First, IO.SYS is loaded and its code executed. IO.SYS will then executed MSDOS.SYS (in pure DOS systems--MSDOS.SYS is just a text file in Windows 95 and later.) Then the more complete operating system code loads and initializes the rest of the operating system structures. For MS-DOS, this means loading the command interpreter (COMMAND.COM) and then reading and interpreting the contents of the CONFIG.SYS and AUTOEXEC.BAT system control files.
At this point the operating system code itself has control of the PC. In the case of 32-bit Windows versions like Windows 95/98/ME, the steps above are only the beginning of the process. The initial DOS operating system files control the loading and execution of many more routines as the boot progresses, which perform tasks such as reading the system registry, initializing hardware devices and starting the graphical operating system shell. In fact, it is surprising in some ways just how many different pieces of code have a hand in starting up the PC.

Note 1: For those of you who has an interest to study viruses resides hidden in Boot Sector and get executed by BIOS.

Note 2: Most computers are also capable of booting over a computer network. In this scenario, the operating system is stored on the disk of a server, and certain parts of it are transferred to the client using a simple protocol such as the Trivial File Transfer Protocol. After these parts have been transferred, the operating system then takes over control of the booting process.
User avatar
Face
Major
Major
Posts: 727
Joined: Thu Feb 18, 2010 5:06 pm
Location: SRI LANKA.KANDY.

Re: PC process

Post by Face » Sat Apr 10, 2010 9:21 am

friend I'm asking my questions according to my NOTE BOOK...he he :D

so there may be some mistakes..sorry about them & thank you very much for your help to do my studies.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: PC process

Post by Neo » Sat Apr 10, 2010 6:31 pm

One thing to note. You don't have to memorise all these steps and all. Just understand how the CPU follows through the booting process.
  1. Power On OR Reset
  2. Execute BIOS
    CPU executes a firmware program called BIOS that is stored in ROM chip of motherboard
  3. BIOS POST - As a part of BIOS, Power On Self Test functions will be executed to check errors.
    Critical errors are notified by Beeps or Error messages.
  4. BIOS initialises devices like VGA, Disk drives, etc...
  5. BIOS hand over the execution to the code at Master Boot Record (Track 0) of your Bootable Hard Disk/CD ROM/Floppy, etc...
  6. From Partition Table (Resides in MBR), it then jumps to boot partition's first sector.
  7. Again on that sector (Called Boot Sector), we have an executable code to load the operating system called bootloader
  8. Popular bootloaders are NTLDR (Windows), LILO (Linux), GRUB, BOOTMGR, Syslinux
  9. From there the execution jumps to file level execution which will then gives control to the residing Operating System
In short, that's what you need to remember.
User avatar
Face
Major
Major
Posts: 727
Joined: Thu Feb 18, 2010 5:06 pm
Location: SRI LANKA.KANDY.

Re: PC process

Post by Face » Sat Apr 10, 2010 9:23 pm

thank you BRO..It is good help from you.that is easy to remember the short points.
But it is good to get a clear idea from you first post.then i can remember the points easly.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: PC process

Post by Neo » Sun Apr 11, 2010 1:23 am

Exactly. Read the whole thing but memorise the short note :mrgreen:
Post Reply

Return to “Computer Architecture”