When computer is powered on: How does it know from which instruction it needs to start executing?
First its the BIOS program that needs to be executed. So, what exactly happens there? I want to know the process till OS is loaded.
It's very processor dependent, as you might expect.
In general, the processor hardware comes up in some default configuration, and then starts executing from a particular memory address. What happens after that is all up to software.
Usually the first instruction executed is a jump to bootloader software of some kind, which then prepares the hardware and loads the next software stage. Repeat that setup/load process as many times as you want and presto - you're in the OS!
Some processors are more configurable than others, and have hardware strapping options (or fuses in silicon) that can control some of the boot parameters. Others have built in ROM code that executes at power on or chip reset. Some chips have built in memory, others can set up external memory automatically, and still others require software to be loaded to perform even the most basic of bootstrapping tasks.
If you clarify your question a bit more, we might be able to fill in some more details about the specific process of a system you're interested in.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With