3.3 A computer employs a 16 Mbyte 32-bit word main memory and a cache of 8 Kbyte
ID: 3816177 • Letter: 3
Question
3.3 A computer employs a 16 Mbyte 32-bit word main memory and a cache of 8 Kbytes. Determine the number of bits in each field of the address in the following organizations: I. Direct mapping with a line size of one word. 2. Direct mapping with a line size of eight words. 3. Set-associative mapping with a set size of four and line size of one word. 3.4 Derive an expression for the hit ratio of a direet mapped cache assuming there is an equal likelihood of any location in the main memory being accessed (in practice this assumption is not true). Repeat for a two-way set- associative mapped cache. Determine the size of memory at which the direct mapped cache has a hit ratio within 10 per cent of the set-associative cache. 3.5 A cache memory has a lotal of 256 lines (blocks) of 16 bytes each. The processor generates 32-bit (byte) addresses. Draw the cache configuration giving the number of bits in each field of the addresses ir the cache is direct mapped. Assume the cache is full when a new series of addresses are being accessed which are not currently in the cache. The following addresses (in hexadecimal) arc produccd by the processor, in sequence: 00053272105 00053502120 00053271130 00053272106 00053502124 00053261130 00053272104Explanation / Answer
3.3 Given information
Main memory = 16 Mbytes = 2^24
Cache size = 8Kb = 16 blocks
Block size = 32-bit word= 2^5
no. of lines = cachhe size/block size
= 2^16/2^5
= 2^11 i.e 11
1. Direct mapping with a line size of one word: 4 bytes
no. of lines: 2^11/2^2
= 2^9
Index = 9
Hence tag= 24-5-9= 10.
2. Direct mapping with a line size of eight word: 32 byte
no. of lines = 2^11/2^5
= 2^6
Index = 6
Hence tag= 24-5-6= 13.
3. 4-way associative line size of one word: 4 byts * 4way associative
no. of lines: 2^11/2^4
= 2^7
Index = 7
Hence tag= 24-5-7= 12
Related 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.