BIT101 ยท 2079 ยท 5 marks
Define Bus with its types. Why do we need memory hierarchy?
Define Bus with its types. Why do we need memory hierarchy? [5]
Introduction to Information TechnologyChapter 3: Computer Organization and ArchitectureComputer bus types and functions
Quick answer
A bus is a shared communication pathway (set of parallel wires/lines) that connects multiple components of a computer system (CPU, memory, I/O devices) and allows transfer of data, addresses, and control signals between them.
Bus: Definition and Types + Memory Hierarchy
Definition of Bus
Types of Bus
A system bus is typically composed of three functional types:
1. Data Bus
- Carries actual data between the processor, memory, and I/O devices.
- It is bidirectional (data can flow in both directions).
- Width (e.g., 8-bit, 16-bit, 32-bit, 64-bit) determines how much data can be transferred at once.
2. Address Bus
- Carries the memory address specifying where data should be read from or written to.
- It is unidirectional (flows from CPU to memory/I/O).
- Width determines the maximum addressable memory (e.g., 32-bit address bus can address 2ยณยฒ locations).
3. Control Bus
- Carries control signals that coordinate and manage operations on the bus.
- Signals include: Read/Write, Memory Request, Interrupt, Clock, Bus Request, Bus Grant, etc.
- It is bidirectional.
Why Do We Need Memory Hierarchy?
Memory hierarchy is needed due to the following reasons:
1. Speed vs. Cost Trade-off
- Fast memory (e.g., registers, cache) is very expensive and cannot be used in large quantities.
- Slow memory (e.g., hard disk) is cheap but too slow for direct CPU use.
- Hierarchy allows a balance between speed and cost.
2. Bridging the Speed Gap (CPU-Memory Gap)
- Modern CPUs operate at very high speeds (GHz range), but main memory (RAM) is significantly slower.
- Cache memory is placed between CPU and RAM to reduce access time and prevent the CPU from waiting (avoiding bottleneck).
3. Principle of Locality
- Programs exhibit temporal locality (recently used data will be used again soon) and spatial locality (nearby memory locations will be accessed soon).
- Hierarchy exploits this by keeping frequently used data in faster, smaller memory.
4. Efficient Use of Resources
- By storing only the most needed data in expensive fast memory and the rest in cheaper slow memory, the system achieves near-fast-memory performance at near-slow-memory cost.
Memory Hierarchy Levels (Top to Bottom):
| Level | Memory Type | Speed | Cost | Size |
|---|---|---|---|---|
| 1 | Registers | Fastest | Highest | Smallest |
| 2 | Cache (L1, L2, L3) | Very Fast | High | Small |
| 3 | Main Memory (RAM) | Moderate | Moderate | Medium |
| 4 | Secondary Storage (HDD/SSD) | Slow | Low | Large |
| 5 | Tertiary (Tape, Cloud) | Slowest | Lowest | Largest |
Summary: Memory hierarchy is needed to provide the illusion of a large, fast, and affordable memory system by combining different levels of storage with varying speed, cost, and capacity.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.