As discussed in class, please explain the following:
-
Instruction Cycle: The fundamental steps the CPU takes to execute each instruction:
- Fetch: Retrieve instruction from memory.
- Decode: Interpret the instruction.
- Execute: Perform the operation.
- Memory Access: Read/write data to/from memory (if needed).
- Write-back: Store the result in a register or memory.
Explain the operation of each stage and the significance of their sequence.
-
Memory Hierarchy: A multi-level memory structure designed for speed and cost-effectiveness. Levels (fastest to slowest):
- Registers: On-CPU memory.
- Cache (L1, L2, L3): Fast memory between CPU and RAM.
- Main Memory/RAM: Memory for active data and programs.
- Secondary Storage: External storage like HDDs and SSDs.
Describe the characteristics (speed, capacity, cost) and interaction of each level. Address the concept of Locality.
-
Pipelining: A technique for overlapping instruction execution. By dividing instruction execution into stages, multiple instructions can be processed concurrently in different pipeline stages, akin to an assembly line, boosting throughput.
Explain pipeline types, hazards, and their solutions.