How do you find the cache line size? I have seen some people use the offset to f
ID: 3709892 • Letter: H
Question
How do you find the cache line size? I have seen some people use the offset to find it. However, when I do that my answer is off from the professor. Her answer is that the cache line size is 6 bytes and 7bits.Also when do you know when to replace blocks? m.com is2jfe/kcontent/439663/viewContent/4757386/Viesw 8s Education python ike, n Facebook 0 Login l AWS Ee CitHub Stude ard CECS 341 Sec 11 9133 Computer Architect Organi... 8 A ontent MediaClasslist Dropbox Online Rooms Quizzes Discussions Grades Support Chapter 5 HW 2.Solution Solution Q3. For a direct maped cache design with 32-bit adress the following bits of the addres are used access the cache. Ta Index Offset 31-10 9-4 1. What is the cache line size (in bytes)? Il. The following cache references are recorded. 0, 4, 16, 132, 232, 160, 1024, 30, 140, 3100, 180, 2180 How many blocks are replaced? Fill in the table. Address o Line ID 16 | 132 | 232 160 11024 | 30 | 140 | 3100| 180|2180 Hit Miss III. What is the hit ratio? IV, what is the miss ratio? 5 6 8 9 T Y T
Explanation / Answer
1.
Since Offset field is 5 bits, so cache line size = 2^5/4 = 32/4 = 8 words
2.
ratio between total bits required for such a cache implementation over the data storage bits
Ratio = [ 32 * ( 32*8 + 22 + 1)]/[32 * (32*8)] = 279/256
Block address = referenced address / block size in bytes
Line/block ID = Number of block in cache = block address mod (#blocks in cache)
3.
Hit ratio = number of hits/total number of accesses = 3/ 12 = 0.25
4.
Miss ration=number of miss/total number of access=9/12=0.75.
Address 0 4 16 132 232 160 1024 30 140 3100 180 2180 Line ID 0 0 1 8 14 10 0 1 8 1 11 8 Hit/Miss M H M M M M M H H M M M Replace N N N N N N Y N N Y N YRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.