# A computer system contains a main memory of 32K 16 bit words It als

Content type
User Generated
Rating
Showing Page:
1/27
A computer system contains a main memory of 32K 16-bit
words. It also has a 4K word cache divided into four-line
sets with 64 words per line. Assume that the cache is
initially empty. The processor fetches words from locations
0, 1, 2, . . ., 4351 in that order. It then repeats this fetch
sequence nine more times. The cache is 10 times faster
than main memory. Estimate the improvement resulting
from the use of the cache. Assume an LRU policy for block
replacement.
Solution
ANS :
Set 0
Set1
Set2
Set3
Set4
Set5
Set6
Set7
Set8
Set9
Set10

Showing Page:
2/27
Set11
Set12
Set13
Set14
Set15
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr0
Fr1
Fr1
Fr1
Fr1

Showing Page:
3/27

End of Preview - Want to read all 27 pages?
Access Now
Unformatted Attachment Preview
A computer system contains a main memory of 32K 16 -bit words. It also has a 4K word cache divided into four -line sets with 64 words per line. Assume that the cache is initially empty. The processor fetches words from locations 0, 1, 2, . . ., 4351 in that order. It then repeats this fetch sequence nine more times. The cache is 10 times faster than main memory. Estimate the improvement resulting from the use of the cache. Assume an LRU policy for block replacement. Solution ANS : Set 0 Set1 Set2 Set3 Set4 Set5 Set6 Set7 Set8 Set9 Set10 Set11 Set12 Set13 Set14 Set15 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr0 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr1 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr2 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 Fr3 cache is 10 times faster than main memory Cache Access Time = t Memory Access Time = 10*t As far as we have Niter = 15 iterations of references from 0 to 4351 (with total number of ref erences Nref = 4352) total number of blocks accessed on each iteration is Nref 4352 NBL = -------- = Block Size ------- = 68 64 but we have only 64 block frames in cache. Total Time for Fetches Without Cache = Nref * Memory Access Time * Niter = 4352 * 10 * t * 15 = 652800*t Total Time for Fetches With Cache = Time for Fetches From Cache (on hits) + Time for Fetches From Memory(on misses); Time for Fetches From Cache (on hits) = Nref * Cache Access Time * Niter; Ti ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
Excellent resource! Really helped me get the gist of things.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4