Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | Gate IT 2007 | Question 37

  • Last Updated : 28 Jun, 2021

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 BlockBlocks
08, 0, 16, 24
19, 17, 25, 63, 17
22, 18, 2, 82
33
420
55, 5
630
763,63


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!