Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | Gate IT 2007 | Question 37

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

Consider a Direct Mapped Cache with 8 cache blocks (numbered 0-7). If the memory block requests are in the following order
3, 5, 2, 8, 0, 63, 9,16, 20, 17, 25, 18, 30, 24, 2, 63, 5, 82,17, 24.
Which of the following memory blocks will not be in the cache at the end of the sequence ?
(A) 3
(B) 18
(C) 20
(D) 30


Answer: (B)

Explanation: Location of memory block in cache  =  block  % number of cache blocks

Since it is a direct mapped cache, no replacement policy is required. As we can see in the table, 18 is further replaced by 82 in the 2nd cache block whereas 3,20 and 30 are all present in the cache till the end. Therefore, Answer is B

Memory Block Blocks
0 8, 0, 16, 24
1 9, 17, 25, 63, 17
2 2, 18, 2, 82
3 3
4 20
5 5, 5
6 30
7 63,63


Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!