Computer System Overview
2024-11-07
What is a
Computer Program?
Source: Nbauers (Wikipedia), CC0 1.0
Source: Berkut (Wikipedia), GFDL
Source: en:User:Cburnett (Wikipedia), GFDL
Floating Point Unit (FPU)
Math coprocessor specially designed to operate on floating point numbers
Address Generation Unit (AGU)
Calculate memory addresses in parallel to improve the performance
Clock
The frequency of a CPU is didcted by an external clock (oscillator)
What data is getting
stored in the registers?
Data inside registers can be accessed by the CPU immediately
Registers operate with the same clock speed as the CPU itself
Data registers (= accumulators) store operands for the ALU and their results,
Address registers for memory addresses of operands and instructions
Program counter (PC) (= instruction pointer) contains the memory address of the next instruction
Instruction register (IR) stores the instruction, which is currently executed
Stack pointer (SP) stores the memory address at the current end of the stack
Image source: http://courses.cs.vt.edu/~csonline/MachineArchitecture/Lessons/CPU/cpu_circuit.gif
Why does the OS need to know the registers of a CPU?
What is the purposes of the various buses in a computer system?
Usually, the number of lines is equal to the width of the registers of the ALU
Number of lines with modern CPUs: 64
Number of Data Bus lines of some CPUs
CPU | Data bus |
4004, 4040 | 4 Bits |
8008, 8080, 8085, 8088 | 8 Bits |
8086 (XT), 80286 (AT), 80386SX | 16 Bits |
80386DX, 80486SX/DX/DX2/DX4 | 32 Bits |
Pentium I/MMX/II/III/IV/D/M, Celeron, Core Solo/Duo, Core 2 Duo, Core 2 Extreme, Pentium Pro, | |
Pentium Dual-Core, Core 2 Quad, Core i7, Itanium, AMD Phenom-II, Itanium 2, AMD64 | 64 Bits |
Transmits memory addresses
Memory addresses and I/O devices are accessed (addressed) via this bus
The number of lines specifies the max. number of memory addresses
How many bits has the address bus of your CPU?
On Linux systems:
grep 'address sizes' /proc/cpuinfo
Number of Address Bus lines of some CPUs
CPU | Address bus | max. addressable |
4004, 4040 | 4 Bits | \(2^4\) = 16 Bytes |
8008, 8080 | 8 Bits | \(2^8\) = 256 Bytes |
8085 | 16 Bits | \(2^{16}\) = 65 kB |
8088, 8086 (XT) | 20 Bits | \(2^{20}\) = 1 MB |
80286 (AT) | 24 Bits | \(2^{24}\) = 16 MB |
80386, 80486, Pentium I–IV/MMX/D/M, Celeron | 32 Bits | \(2^{32}\) = 4 GB |
Core Solo/Duo, Core 2 Duo/Extreme/Quad, Pentium Pro, Pentium Dual-Core, Core i7 | 36 Bits | \(2^{36}\) = 64 GB |
Itanium | 44 Bits | \(2^{44}\) = 16 TB |
AMD Phenom-II, Itanium 2, AMD64 | 48 Bits | \(2^{48}\) = 256 TB |
Difference between address bus and control bus:
Important use of the control bus: interrupt requests (IRQs) from I/O devices to the CPU
Typical number of lines: \(\leq\) 10
The chipset connects the CPU with the rest of the computer system
The chipset consists of…
The bus between CPU and chipset is called Front Side Bus (FSB)
Some bus systems:
Internal computer busses | External computer busses | |
---|---|---|
Parallel busses | PATA (IDE), PCI, ISA, SCSI | PCMCIA, SCSI |
Serial busses | SATA, PCI-Express | Ethernet, FireWire, USB, eSATA |
Devices for computer systems are distinguished via their minimum transfer unit:
Character devices
On arrival/request of each single character, communication with the CPU always takes place
Examples: Mouse, keyboard, printer, terminal, or magnetic tape
Block devices
Data transfer takes place only when an entire block (e.g., 1–4 kB) is present
Examples: HDD, SSD, optical drives
3 concepts exist of how processes can read data into a computer:
Busy Waiting
Interrupt-driven
Direct Memory Access (DMA)
The driver sends the request to the device and waits in an infinite loop until the controller indicates that the data is available
Example: Programmed Input/Output (PIO)
Examples:
PATA HDDs in PIO mode,
legacy serial ports, legacy parallel ports, PS/2 keyboard and mouse ports
Source: http://www.cpu-world.com/Support/82/Intel-P8257.jpg
Storage | Read/Write operation | Access Method | Movable Parts | Persistent |
---|---|---|---|---|
Punched tape | mechanic | sequential | yes | yes |
Punch card | mechanic | sequential | yes | yes |
Magnetic tape | magnetic | sequential | yes | yes |
Magnetic stripe card | magnetic | sequential | yes | yes |
Cache and Registers (SRAM) | electric | random | no | no |
Main memory (DRAM) | electric | random | no | no |
Non-volatile RAM (NVRAM): FRAM, MRAM, PRAM | electric | random | no | yes |
Flash memory (USB drive, SSD, CF/SD card) | electric | random | no | yes |
Compact cassette (Datasette) | magnetic | sequential | yes | yes |
Floppy disk | magnetic | sequential | yes | yes |
Hard disk drive (HDD) | magnetic | sequential | yes | yes |
CD-ROM/DVD-ROM | optical/mechanic | sequential | yes | yes |
CD-R/CD-RW/DVD-R/DVD-RW | optical | sequential | yes | yes |
MiniDisc | optical/magneto-optical | sequential | yes | yes |
(only technologies in bold are still relevant)
Each punch card usually represents a single line of text with 80 characters or a corresponding number of binary data
The punched tape in the image has 8 holes for data and narrower holes to feed the tape
Data is represented on CDs/DVDs by pits and lands, which are applied to a plastic material
Image sources:
punch card: Christian Baun
punched tape: TedColes. Wikimedia (CC0)
pressed CD with pits and lands: Stefan Kolb. Wikimedia (CC0)
Image source: http://sub.allaboutcircuits.com/images/04212.png
Image source: Gregg Tavares (CC-BY-2.0)
Image source: George Chernilevsky (CC0)
Write-through
Figure: A process wants to carry out a write operation. It writes (1) the data into the cache and sends the write operation to the controller. The controller commands (2) the writing of the data into the storage. If the data was written successfully, the controller reports (3) the successful writing of the data to the process
For every page in the cache a dirty bit is stored inside the cache, which indicates whether the page has been modified or not
Write-back
Figure: A process wants to carry out a write operation. It writes (1) the data into the cache and sends the write instruction to the controller. The controller reports (2) immediately the successful writing of the data to the process. The writing (3) of the data into the storage is carried out asynchronous to the write instruction in the process
An Elitegroup SI5PI AIO with a Pentium 60. The mainboard has 16 memory module sockets for L2 cache