🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Memory Hierarchy and Cache: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Looping through an array element by element benefits mainly from:
  2. Q2. Hit time 1 ns, miss rate 5%, miss penalty 100 ns. What is the AMAT?
  3. Q3. For a 64 KB, 4-way set-associative cache with 64-byte blocks and 32-bit addresses, how many index bits are there?
  4. Q4. How many index bits does a fully associative cache have?
  5. Q5. In the simulator, why did address 64 cause evictions?
  6. Q6. A cache has 64-byte blocks. How many offset bits does an address need?
  7. Q7. A program touches 2 MB of data again and again, but the cache is only 1 MB. Which type of miss dominates?
  8. Q8. Which write policy marks a line "dirty" and writes it to memory only when the line is evicted?
  9. Q9. What does this print? (code)
  10. Q10. What does this print? (code)