How a modern computer system works
CPU, memory, buses and devices as one machine.
Module 1
Session 1.1
Lesson 3 of 6
How a Modern Computer System Works
Interactive visualization based on OS architectural principles (CPU, Cache, RAM, I/O & DMA)
Step 1 of 5: Instruction Execution Cycle
1. CPU Instruction Fetch & Execution CPU ↔ Memory
The CPU continuously executes instructions fetched from memory via the instruction execution cycle (Fetch, Decode, Execute). To overcome performance bottlenecks from slow main memory (RAM), modern CPUs use high-speed Cache memory integrated on the processor die to store frequently accessed instructions and data.
2. Data Movement & Memory Bus CPU ↔ Cache ↔ Memory
Data flows back and forth between memory, cache, and CPU registers during computation. When data modified by a thread needs to be written back to main memory, or when a cache miss occurs, the system bus performs bidirectional data movement operations.
3. I/O Requests & Device Management CPU → Devices (*M)
When a program needs input or output (e.g., reading a file from disk or sending a packet over the network), the CPU issues an I/O request to a specific device controller. Modern systems support multiple device controllers (denoted as
*M) operating concurrently alongside multi-core processors (*N).
4. Interrupt-Driven Synchronization Device → CPU
Because hardware devices are much slower than the CPU, the CPU does not wait idle. Once a device finishes its assigned task (or completes reading data into its buffer), it fires a hardware interrupt signal to alert the CPU. The CPU temporarily pauses its current execution thread to run an Interrupt Service Routine (ISR).
5. Direct Memory Access (DMA) Device ↔ Memory (Bypassing CPU)
For high-speed I/O devices (like SSDs or Gigabit Ethernet), transferring data byte-by-byte through the CPU creates massive overhead. Instead, Direct Memory Access (DMA) allows the device controller to transfer large blocks of data directly to/from main memory without involving the CPU, issuing only a single interrupt when the entire block transfer completes.