




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Seat Number Name
This is a closed book exam. You may use a calculator, as long as it is not capable of accessing a network. No cell phones. This is a 75-minute exam. The questions are divided into 2 parts. The first part is worth 80 points. Everyone should be able to finish Part 1. Part 2 is worth 20 points. If you cannot do the questions are Part 1 quickly, you may not have time to finish Part 2. Put your answers in the space provided. You must show your work to get credit. If you cannot fit your answers in the space provided, use the back of the last page or ask for an additional sheet of paper. You will be given a page of diagrams to refer to for this exam. You must turn in the diagram sheet with your exam.
(4 points) Suppose that a cache has a hit time of 1 cycle, a hit ratio of 92% and a miss penalty of 7 cycles. What is the average access time in cycles? Put a box around your final answer.
(5 points) Suppose we have a standard MIPS 5-stage pipeline which has a CPI of 1 when all memory accesses are cache hits. A unified cache is used with a hit rate of 95% and a miss penalty of 21 cycles. Loads and stores are 32% of all instructions. What is the CPI when cache misses are taken into account? Put a box around your final answer.
(5 points) What is the most important reason for using separate caches for instructions and data? Explain.
b) 2-way set associative
c) 4-way set associative
d) fully associative
(2 points) For problem 4, find the block address and offset in hexadecimal for the address 0x17b456. Note: The answer is the same for all four parts of problem 4.
(8 points) For the byte at address given in problem 5, describe in words how you would determine whether the byte is in the cache. Be specific by calculating, block, set, and offset numbers in hexadecimal that indicate where to look and what to look for. a)
b)
c)
d)
Cache hit rate hit time L1 .85 1 ns. L2 .92 7 ns. L3 .95 15 ns.
b) What is a TLB? What is it used for? Why is it necessary? What is typically stored in a TLB entry?
(6 points) A virtual memory system has a 64-bit virtual address, a 40-bit physical address, a page size of 16K, and a TLB with 64 entries. How many total bits are required for the TLB if the TLB is: a) direct mapped b) 2-way set associative c) fully associative Show your work, label you answers and put boxes around them.
(13 points) The diagram shows the memory organization of a processor with a TLB and 2 levels of cache. The number of bits in each field is labeled with a lower case letter, a through r. For each blank field in the table below, fill in the value, or write ND, for “not determined by the information given.” Assume the following: Virtual addresses are 64 bits Physical addresses are 47 bits The page size is 64K The TLB has 32 entries and is direct mapped The L1 cache is 2-way set associative with a block size of 64 bytes. The L2 cache is 4MB and 4-way set associative the L1 and L2 caches use the same block size a b c d e f g h i j k l m n o p q r
Seat Number Name