Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When computer is powered on: How does it know from which instruction it needs to start executing?

Tags:

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.

like image 941
claws Avatar asked Feb 05 '10 16:02

claws


1 Answers

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.

like image 136
Carl Norum Avatar answered Oct 12 '22 08:10

Carl Norum