Computer_Architecture_Module_1_2_Notes
Computer_Architecture_Module_1_2_Notes
RISC vs CISC
Comparison Table:
- Instruction Count: RISC < CISC
- Execution Speed: RISC > CISC
- Complexity: RISC < CISC
2. Pipelining
Stages:
- IF: Instruction Fetch
- ID: Instruction Decode
- EX: Execute
- MEM: Memory Access
- WB: Write Back
Hazards:
- Data Hazard (RAW, WAR, WAW)
- Structural Hazard (resource conflict)
- Control Hazard (branch prediction)
3. Memory Hierarchy
Memory levels:
- Registers (Fastest, Smallest)
- Cache (L1, L2, L3)
- Main Memory (RAM)
- Secondary Storage (HDD/SSD)
Principles:
- Temporal Locality: Recent data used again
- Spatial Locality: Nearby data used soon
Modes:
- Burst Mode
- Cycle Stealing
- Transparent Mode
Benefits:
- CPU is free for other tasks
- Faster I/O operations
Hardwired:
- Control signals generated using combinational logic
- Fast but inflexible
Microprogrammed:
- Uses control memory to store microinstructions
- Easy to modify and flexible
Communication:
- Shared memory
- Message passing
Synchronization:
- Locks
- Semaphores
- Barriers
7. Memory Interleaving
Types:
- High-order interleaving
- Low-order interleaving
Cache Mapping:
- Direct Mapping: One block per line
- Associative Mapping: Any block to any line
- Set-Associative: Set of lines
Replacement Algorithms:
- FIFO: First-In-First-Out
- LRU: Least Recently Used
- Random: Replace any block