Computer System Overview

Computer System Overview

Overview

A computer is an electronic device that receives input data, processes it, and outputs results. In this lesson, we'll learn about the history of computers, their basic structure, and the relationship between hardware and software.


Table of Contents

  1. History of Computers
  2. Von Neumann Architecture
  3. Hardware Components
  4. Software Layers
  5. Performance Measurement
  6. Practice Problems

1. History of Computers

Evolution by Generation

Generation Period Core Technology Characteristics
1st Gen 1940s-1950s Vacuum tubes ENIAC, large size, high heat, low reliability
2nd Gen 1950s-1960s Transistors Miniaturization, low power, COBOL/FORTRAN
3rd Gen 1960s-1970s Integrated Circuits (IC) Operating systems, multiprogramming
4th Gen 1970s-Present VLSI/ULSI Microprocessors, personal computers
5th Gen Present-Future AI/Quantum computers Parallel processing, artificial intelligence

Major Milestones

1946: ENIAC (first general-purpose electronic computer)
1947: Transistor invented (Bell Labs)
1958: Integrated circuit invented (Jack Kilby)
1971: Intel 4004 (first commercial microprocessor)
1981: IBM PC
2007: iPhone (mobile computing era)

2. Von Neumann Architecture

Core Concept

The computer architecture proposed by John von Neumann in 1945, which most modern computers follow.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              CPU (Central Processing Unit) β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Control β”‚  β”‚   ALU   β”‚  β”‚Registersβ”‚  β”‚
β”‚  β”‚  Unit   β”‚  β”‚(Arithmeticβ”‚  β”‚         β”‚  β”‚
β”‚  β”‚         β”‚  β”‚  Logic  β”‚  β”‚         β”‚  β”‚
β”‚  β”‚         β”‚  β”‚  Unit)  β”‚  β”‚         β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ System Bus
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚             β”‚             β”‚
β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
β”‚ Memory  β”‚  β”‚   Input   β”‚  β”‚  Output β”‚
β”‚  (RAM)  β”‚  β”‚ Devices   β”‚  β”‚ Devices β”‚
β”‚         β”‚  β”‚(Keyboard, β”‚  β”‚(Monitor,β”‚
β”‚         β”‚  β”‚   etc.)   β”‚  β”‚  etc.)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Core Principles

  1. Stored Program Concept: Programs and data stored in the same memory
  2. Sequential Execution: Instructions executed sequentially, one at a time
  3. Binary Representation: All data represented in binary

Von Neumann Bottleneck

Data transfer speed between CPU and memory is a performance bottleneck

CPU Speed >> Memory Speed

Solutions:
- Cache memory
- Pipelining
- Multiple buses

3. Hardware Components

3.1 Central Processing Unit (CPU)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  CPU                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚      Control Unit (CU)            β”‚  β”‚
β”‚  β”‚  - Instruction decoding           β”‚  β”‚
β”‚  β”‚  - Execution sequence control     β”‚  β”‚
β”‚  β”‚  - Control signal generation      β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Arithmetic Logic Unit (ALU)      β”‚  β”‚
β”‚  β”‚  - Arithmetic operations (+,-,*,/)β”‚  β”‚
β”‚  β”‚  - Logic operations (AND,OR,NOT)  β”‚  β”‚
β”‚  β”‚  - Comparison operations          β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚         Registers                 β”‚  β”‚
β”‚  β”‚  - PC (Program Counter)           β”‚  β”‚
β”‚  β”‚  - IR (Instruction Register)      β”‚  β”‚
β”‚  β”‚  - AC (Accumulator)               β”‚  β”‚
β”‚  β”‚  - MAR, MBR (Memory access)       β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3.2 Main Memory

Type Characteristics Usage
RAM Volatile, read/write Running programs/data
ROM Non-volatile, read-only BIOS, firmware
Cache High-speed, small capacity Bridge CPU-memory speed gap

3.3 Secondary Storage

Type Speed Capacity Characteristics
SSD Fast Medium Flash memory, silent
HDD Slow Large Magnetic disk, inexpensive
USB Medium Small Portable

3.4 Bus System

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Data Bus                      β”‚
β”‚    (Data transfer between CPU ↔ Memory)   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Address Bus                   β”‚
β”‚    (Memory address specification, unidirectional) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Control Bus                   β”‚
β”‚    (Read/write control signals)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4. Software Layers

Layer Structure

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Application Programs          β”‚  Web browsers, games, word processors
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    System Software               β”‚  Compilers, libraries
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    Operating System (OS)         β”‚  Windows, Linux, macOS
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    Firmware / BIOS               β”‚  Hardware initialization
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    Hardware                      β”‚  CPU, memory, disk
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Instruction Execution Cycle

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚  Fetch  β”‚ β†’ β”‚ Decode  β”‚ β†’ β”‚ Execute β”‚     β”‚
β”‚  β”‚         β”‚   β”‚         β”‚   β”‚         β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚       ↑                            β”‚          β”‚
β”‚       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β”‚                  Repeat                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

1. Fetch:   Retrieve instruction from address pointed to by PC
2. Decode:  Decode instruction, determine required operation
3. Execute: Perform operation in ALU, store result

5. Performance Measurement

Key Metrics

Metric Description Unit
Clock Speed Clock cycles per second Hz (GHz)
CPI Cycles per instruction cycles/instruction
MIPS Million instructions per second million instructions/sec
FLOPS Floating-point operations per second floating point ops/sec

Performance Calculation Formulas

CPU Time = Instruction Count Γ— CPI Γ— Clock Period

         Instruction Count Γ— CPI
CPU Time = ───────────────────────
            Clock Speed

Example:
- Instruction count: 1 billion
- CPI: 2
- Clock speed: 4GHz

CPU Time = (10^9 Γ— 2) / (4 Γ— 10^9) = 0.5 seconds

Amdahl's Law

Overall Speedup = 1 / ((1 - P) + P/S)

P: Fraction of program that can be improved
S: Speedup factor for that fraction

Example: Improve 80% of program to run 2Γ— faster
= 1 / ((1 - 0.8) + 0.8/2)
= 1 / (0.2 + 0.4)
= 1.67Γ— speedup

6. Practice Problems

Basic Problems

  1. What are the five components of Von Neumann architecture?

  2. Which of the following is volatile memory?

  3. (a) ROM
  4. (b) RAM
  5. (c) SSD
  6. (d) HDD

  7. Which part of the CPU decodes instructions?

Calculation Problems

  1. If a CPU has a clock speed of 3GHz and CPI of 1.5, how long does it take to execute 900 million instructions?

  2. If 70% of a program can be parallelized and runs on 4 cores, what is the maximum speedup according to Amdahl's Law?

Advanced Problems

  1. Describe three methods to solve the Von Neumann bottleneck.

  2. Explain the differences between Harvard architecture and Von Neumann architecture.

Answers 1. Input devices, output devices, memory, arithmetic logic unit (ALU), control unit 2. (b) RAM 3. Control Unit 4. (9Γ—10^8 Γ— 1.5) / (3Γ—10^9) = 0.45 seconds 5. 1 / ((1-0.7) + 0.7/4) = 1 / (0.3 + 0.175) = 2.1Γ— 6. Cache memory, pipelining, multiple buses, Harvard architecture 7. Harvard architecture stores instructions and data in separate memories and accesses them via separate buses

Next Steps


References

to navigate between lessons