A computer uses a small direct-mapped cache between the main memory and the processor. The cache has
Question:
A computer uses a small direct-mapped cache between the main memory and the processor. The cache has four 16-bit words, and each word has an associated 13-bit tag, as shown in Figure P5.2a. When a miss occurs during a read operation, the requested word is read from the main memory and sent to the processor. At the same time, it is copied into the cache, and its block number is stored in the associated tag. Consider the following loop in a program where all instructions and operands are 16 bits long:
Assume that, before this loop is entered, registers RO, R1, and R2 contain 0, 054E, and 3, respectively. Also assume that the main memory contains the data shown in Figure P5.2b, where all entries are given in hexadecimal notation. The loop starts at location LOOP 02EC.
(a) Show the contents of the cache at the end of each pass through the loop.
(b) Assume that the access time of the main memory is 107 and that of the cache is 17. Calculate the execution time for each pass. Ignore the time taken by the processor between memory cycles.LO1
Step by Step Answer:
Computer Organization
ISBN: 9780072320862
5th Edition
Authors: V Carl Hamacher, Carl Hamacher, Zvonko G Vranesic, Safwat G Zaky