Architecture: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. What does the program counter hold?
2. What does CPI stand for?
3. Which is the fastest level of the memory hierarchy?
4. What is a TLB?
5. Why do modern chips have several cores?
6. Stage delays are 300, 200, 250, 200 and 150 ps, and one unpipelined instruction takes 1100 ps. What is the ideal speedup of the pipeline for very many instructions, with no register overhead?
7. A cache has 64 lines, 4 ways and 16-byte blocks. How many sets does it have?
8. Which pair has a load-use hazard that forwarding cannot remove?
9. In what order does the processor handle an interrupt?
10. The page size is 1 KB. What are the page number and offset of virtual address 3000?
11. 60% of a program's time is made 3 times faster and 40% is unchanged. What is the overall speedup?
12. A direct-mapped cache has 2 lines of 1 byte. Addresses 0, 1, 0, 1, 2, 0 are read. How many hits?
13. A program has 2 × 10⁹ instructions at CPI 1.2 on a 3 GHz clock. A compiler cuts the instruction count by 25%. What is the new CPU time?
14. Core 2 reads a block that core 1 holds Modified. What must happen?
15. 1000 numbers are added on 8 processors, each adding its own share first. How many additions does each processor do in the local phase?
16. Why can a program use more virtual memory than the computer has RAM?

Practical assessment: A memory system model

Without using hints, write a Python program that models a small memory system: a TLB in front of a page table, and a cache behind the translation.

Final project

A cache simulator: Build a configurable cache simulator that replays a trace of memory addresses, and use it to find out how block size, associativity and replacement change the hit rate of a small program.

How it is evaluated

To complete this course