in CO and Architecture edited by
2,267 views
0 votes
0 votes
A : LRU replacement policy is not applicable to direct mapped caches
B : A unique memory page is associated with every cache page in direct mapped caches

Options:

1) Both True
2) Both False
3) A is True and B is false
4) B is True and A is false
in CO and Architecture edited by
2.3k views

4 Comments

  i am not getting the term associated here i am very poor in dbms

0
0

Many memory blocks matching line number bits mapped to same Cache line/block

eg cache with 4 lines Direct mapped ==> Bits for line field 2 so address will be

Tag | 2 | BO

let MM has 8 blocks

Bno | BO

000 | BO        block 000 and 001 Mapped to Line 0

100 | BO

---------------

001 | BO       block 001 and 101 Mapped to Line 1

101 | BO

---------------

010 | BO      block 010 and 110  Mapped to Line 2

110 | BO

---------------

011 | BO      block 011 and 111 Mapped to Line 3

111 | BO

hope this helps

0
0
edited by

@Shaik Sir , @Arjun Sir  i think First Statement Is Also False

LRU replacement policy is not applicable to direct mapped caches.

In Set  set associative We apply LRU . yes 

and We know When Associative Is  “ n “ then It will Work As a Fully  Associative and When associative Is “ 1 “ then It will Work As a Direct mapping  i think You agree with me…..

 

Then we Also Say that Direct mapping is Also a kind Of  Set associative Mapping And when LRU is Applicable To  Set associative , then It is also applicable in Direct mapping .

 

 Please Clear My Doubt…...

 

 

 

0
0

1 Answer

0 votes
0 votes

option A ---- Both are False

1-For Direct mapped cache all the algorithms will be trivial because there is fixed block no. to which that address belong.

So, LRU is applicable in Direct Mapped Cache but it won't have any effect on hit/miss.So Not applicable is wrong word.

2-As memory Page = Cache page Data of one memory page will be part of only one Cache page .In Direct Mapped Cache Memory address itself contain the address of Cache page number which is unique in itself.

But one Cache Page belongs to more than one Memory Page.

Therefore the second statement is False.

If it would have been "A unique Cache Page is associated with every memory page in Direct Mapped Cache" Then it would have been true

 

edited by

Related questions