Direct mapping – Computer System Architecture

Question 1 UGC NET June-2020        
Consider a machine with a byte addressable main memory of 216 bytes and block size of 8 bytes. Assume that a direct mapped cache consisting of 32 lines is used with this machine.
How many bits will be there in Tag, line and word field of format of main memory addresses?
A – 8,5,3
B – 8,6,2
C – 7,5,4
D – 7,6,3

Show Answer With Best Explanation

Answer- A
Explanation:
Direct mapped cache:
In a direct-mapped cache structure, the cache is organized into multiple set with a single cache line per set. Based on the address of the memory block, it can only occupy a single cache line. The cache can be framed as a (n*1) column matrix.

In above,
Main memory size = 216 B
Block size = 8 B = 23 B , Block offset = 3
Cache line = 32 B = 25 B, Cache line offset = 5

Tag bits = main memory offset – (line offset + Block offset)
= 16 – (5 + 3)
= 16 – 8 = 8


error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?