Question
The size of the physical address space of a processor is bytes. The word length is bytes. The capacity of cache memory is bytes. The size of each cache block is words. For a -way set-associative cache memory, the length (in number of bits) of the tag field is
Official answer and solution
- Official answer
- B
- From
- Official GATE 2018 answer key
Solution
Partition the physical address into tag, set index, and block offset fields.
Determine the widths of each field:
- Total physical address bits: Physical address space is bytes, so physical address length is bits.
- Block size: Each block holds words. With word length bytes, block size is bytes. Thus, the block offset field requires bits.
- Cache capacity and sets: Total cache capacity is bytes. The total number of cache lines is . For a -way set-associative cache, the number of sets is:
Thus, the set index field requires bits.
The tag field length is:
B
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2018 Computer Science and Information Technology (CS)
- Question
- 44 of 65, printed as CS Q.34
- 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.