Question
A 4-way set-associative cache memory unit with a capacity of 16 KB is built using a block size of 8 words. The word length is 32 bits. The size of the physical address space is 4 GB. The number of bits for the TAG field is _____.
Official answer and solution
- Official answer
- 20
- From
- Official GATE 2014 answer key
Solution
Decompose the physical address into tag, set index, and block offset fields using cache capacity and set associativity.
-
Physical Address Space:
- Size = bytes.
- Physical address length = bits.
-
Block Offset (Byte Offset):
- Block size = words.
- Word size = bits = bytes.
- Block size in bytes = bytes bytes.
- Block offset = bits.
-
Set Index Bits:
- Total cache capacity = bytes bytes.
- Total number of cache blocks:
- The cache is 4-way set-associative ( blocks per set):
- Set index = bits.
-
Tag Field Bits:
20
Treating block size as 8 bytes instead of 8 words (32 bytes).
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2014 Computer Science and Information Technology (CS) Session 2
- Question
- 19 of 65, printed as CS Q.9
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.