Adobe Scan 14 Dec 2023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1) This is more flexible mapping method, in which main memory block can be

placed intoany cache block position.

2) In this, 12tag bits are required to identify a memory block when it is resident
in the cache.

3) The tag bitsof an address recevied from the processor are compared to the tag
bits of each block of the cache to see, ifthe desired block is present. This is known
as Associative Mapping technique.
4) Cost of an associated mapped cache is higher than the cost of direct-mapped
because of the need to search all 128 tag patterns to determine whether a block Is
in cache. This is known as associative search.

Set-Associative Mapping
where the
This form of mapping is an enhanced form of direct mapping
addresses the
drawbacks of direct mapping are removed. Set associative
method. It does this by
problem of possible thrashing in the direct mapping
that a block can map to in the
saying that instead of having exactly one line
a set. Then a block in memory
cache, we will group afew lines together creating
map to any one of the lines of a specific set.. Set-associativemapping allows
can
can have two or more words in the
that each word that is present in the cache
associative cache mapping
main nmemory for the same index address. Set
techniques.
combines the best of direct and associative cache mapping

1) It is the combination of direct and associative mapping technique.


main memory
2) Cache blocks are grouped into sets and mapping allow block of
direct
reside into any block of a specific set. Hence contention problem of
mapping is eased, at the same time , hardware cost is reduced by decreasing the
size of associative search.
he eoceneat algothnas alys seluvet
a e s hay ony
3) For a cache with two
blocks per set. In this case, memory
block 0, 64,
128,......4032 map intocache set 0 and they can occupy any two block
Set. within this

4) Having 64 sets means that the 6 bit set


field of the address determines which
set of the cache might contain the desired block. The tag bits of address must be
associatively compared to the tags of the two blocks of the set to check if desired
block is present. This is two way associative search.
Cache

tag.
ta
Block o
Block 1
Block 1

S taq
Set 1 Bi0ck 2
tag Biock 3 tt sleck G3
Block G

Set Block t26


63
tag Block 124 Block 124
Blck 123
Tag Set Wor
6
64
4 | Block 4095
Main Memny Addrecs
Ma'n Memey
(an ap to any blocK eoin 4he set
Use G bats fo tag2 = G4 tag
Gbits fo set =2 G4 sets
ache qre divded nto 64 nd hee a
The blo cuy n
et
too blocy in each

You might also like