The process of booting your computer is relatively seamless, but do you know that a sophisticated process goes on every time your computer starts up? In this article, we’ll explore what occurs when your computer turns on.
The Procedure, in a List
- Power is received, and BIOS checks the computer
- BIOS searches for an operating system
- The bootloader starts up and loads the operating system
1. Power is Received, and BIOS Checks the Computer
Once you press the power button, power is provided to its components. Once the CPU receives power, it loads a small program from read-only memory called UEFI (Unified Extensible Firmware Interface). On older computers, the same type of software is BIOS, which is the Basic Input-Output System. We are going to refer both as the “BIOS” in the rest of the article. These two programs are all firmware, which is a special type of low-level software that comes pre-installed on hardware.
The BIOS does several crucial things. Firstly, it checks the hardware, including the CPU, RAM, and keyboard, for apparent problems. This procedure is called POST, or Power-On Self Test, in which essential pieces of hardware are tested. If a problem has been detected during those test runs, it will emit beep codes for users to find out what the culprit is and repair the computer or send it to service. Beep codes vary in meaning from the firmware manufacturer.
2. BIOS Searches for an Operating System
After the firmware sends a signal indicating that all hardware is in good shape, it searches for an operating system. It first loads the settings from the CMOS. It is a type of volatile memory and is powered by a small battery so that the computer can keep track of your BIOS settings and the current date and time even if it has been switched off.
One of the settings included inside the CMOS is the boot order, which tells the computer the sequence of drives that it should load. Once the firmware finds out what drive to load first, it begins checking its Master Boot Record, or MBR. The MBR is the first sector of the drive. After that, when it finds out where to boot the operating system from that drive, the bootloader is loaded into RAM.
3. The Bootloader Starts Up and Loads the Operating System
At this phase, the bootloader starts up. It is a minimal program, not an operating system. Instead, it loads and starts executing different components of an operating system, such as the kernel, resource managers, user interface, and background processes. If it cannot load one of these files, it will often display an error message saying that a specific file is missing. After finishing the task, it hands control to the operating system.
The exact procedure of this varies as each bootloader has its own way of loading an operating system, so we’re not going to explain them. However, this is such a complex process that it requires numerous programs, libraries, and frameworks on the hard drive to work a certain way, each containing either thousands of lines of code or multiple crucial configurations, and not a single functional bug.
In this article, we’ve explained what happens when your computer starts up. Remember that even the simplest tasks on a computer requires coordination of many different components from a high-level perspective, let alone a low-level one. Please visit the webpages in the references below if you want more relevant information.
References and Credits
- Hoffman, C. (2019, January 2). What Exactly Happens When You Turn On Your Computer? Retrieved April 28, 2022, from https://www.howtogeek.com/398493/what-exactly-happens-when-you-turn-on-your-computer/
- (2021, March 25). What happens when we turn on computer? Retrieved April 28, 2022, from https://www.geeksforgeeks.org/what-happens-when-we-turn-on-computer/
- Iwaya, A. (2014, February 5). Where is the BIOS Stored? Retrieved April 28, 2022, from https://www.howtogeek.com/180798/where-is-the-bios-stored/
- Fisher, T. (2020, December 17). Master Boot Record Definition (MBR, Sector Zero). Retrieved April 28, 2022, from https://www.lifewire.com/what-is-a-master-boot-record-mbr-2625936
- (n.d.). The Startup Sequence of a Computer. Retrieved April 28, 2022, from https://www.futurelearn.com/info/courses/computer-systems/0/steps/53497