retagged by
939 views
1 votes
1 votes

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:

LOOP Add (R1)+,

R0 Decrement R2

BNE LOOP

Assume that, before this loop is entered, registers R0, 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 the access time of main memory is $10\tau$ and that of the cache is $1\tau$. Calculate the execution time for each pass. Ignore the time taken by the processor between memory cycles.

retagged by

1 Answer

0 votes
0 votes

Hi I will like to discuss this problem anyone able to understand solution? Please reply back

Here is solution if aanyoa can explain in more detail please reply

edited by

Related questions

0 votes
0 votes
1 answer
4
nitin.nilesh asked Oct 2, 2015
18,996 views
Consider a magnetic disk drive with 8 surfaces, 512 tracks per surface, and 64 sectors per track. Sector size is 1 KB.The average seek time is 8 ms, the track-to-track ac...