Step 720–30 minutes
Putting It All Together
You've seen the individual parts. Now, let's watch how they work in harmony during the life of a single program execution.
Execution Timeline
OS
Load Program
The OS reads the program file from disk and places its code/data into RAM.
CPU
Initialize PC
The Program Counter (PC) is set to the address of the first instruction.
CPU/RAM
Fetch Loop
The CPU begins the Fetch-Decode-Execute cycle for each instruction.
CPU/IO
System Call
A "print" instruction is reached. The CPU asks the OS to send data to the monitor.
OS
Terminate
The last instruction is executed. The OS cleans up the memory used by the program.
Congratulations!
You now have a foundational mental model of how a computer actually runs your code. You're ready to dive deeper into operating systems, compilers, and advanced software design.