Wednesday, December 03, 2014

What happens when a computer is switched on?

I have tried to make this answer look as simple as possible. 

As soon as the computer is switched on the following events occur in succession:
  1. The SMPS (Simple Mode Power Supply) gets the power from the powercord that you plugged in or from the battery. By the way, SMPS is the power house of any computer system.
  2. Different components require different power, so the SMPS converts it into appropriate voltages and supplies it to the components.
  3. As soon as the ROM gets powered up, it tests(or checks) for all the components of the computer system to verify that they are working fine. For this, it carries out series of tests. For example, in older computers, as soon as you powered up, you would have seen some numbers on the monitor and an OK written next to it.
  4. When the tests are successfully done, the ROM initializes the components. 
  5. The operating system(or at least the bootstrap program) rests on a fixed location in the hard-disk known as the boot block. The ROM knows the address, where exactly should it find the operating system in the hard drive. 
  6. The ROM loads the bootstrap program( a tiny program in the hard drive) into the RAM (Random Access Memory) which in turn brings the entire operating system from some location in the hard disk to the RAM and begins executing the headers, after some time the computer is ready to be used by you.
  7. Most of the modern day operating systems are event driven, which means that once they are ready, they wait for the user inputs, or any of the user activity implying that they are driven by traps and interrupts. If the user does not show any activity, the operating system just stays silent, waiting for *something* to happen before it starts doing *something*.

    This question was originally answered by me on Quora.

No comments:

Post a Comment