What exactly happens When you turn on your computer?

Abstract: When you power on a computer, it goes through a "boot up" process - a term that comes from an idiom "pull oneself up by one's bootstraps". Obviously, it's contradictory, because computer setting up needs to run the program while running program similarly need computer is power on. Until later that boot program burns into the ROM chip, this problem got solved.

Every CPU has a register called program counter that stores the address of the next instruction to be read from memory. When the CPU is powered on, the program counter is reset to its default value(usually it's the lowest count - something like 0X0000). This is the default location a CPU will look for any instruction, once it is on and it's clock starts ticking. If we map BIOS ROM starting from this address, the CPU will read BIOS code and start executing it.BIOS is nothing but a simple OS that can track of hardware configurations like boot device priority and perform some basic hardware tests called Power On Self Test. After POST, the BIOS is programmed to look for a boot loader file from the MBR(Master Boot Record) of the list boot devices. Once the Boot loader is loaded to RAM, it executes the loading of the actual OS to the RAM(What we call as booting)

Copied from https://www.quora.com/How-does-the-CPU-know-where-to-look-for-BIOS-when-we-power-on-our-PC-or-any-other-hardware

Also can look farther by these link https://www.howtogeek.com/398493/what-exactly-happens-when-you-turn-on-your-computer/
https://zhuanlan.zhihu.com/p/60751152
https://en.wikipedia.org/wiki/Booting

posted @ 2020-05-11 23:08  咕咕鸟GGA  阅读(179)  评论(0)    收藏  举报