0% found this document useful (0 votes)
42 views7 pages

Cache Mapping Techniques Overview

The document discusses cache mapping techniques in computer organization and architecture, focusing on direct mapping, associative mapping, and set-associative mapping. It explains the structure of cache memory, including block sizes, cache lines, and replacement algorithms. Additionally, it outlines the concepts of cache hits and misses, as well as the overhead associated with different mapping strategies.

Uploaded by

vydoan.stella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views7 pages

Cache Mapping Techniques Overview

The document discusses cache mapping techniques in computer organization and architecture, focusing on direct mapping, associative mapping, and set-associative mapping. It explains the structure of cache memory, including block sizes, cache lines, and replacement algorithms. Additionally, it outlines the concepts of cache hits and misses, as well as the overhead associated with different mapping strategies.

Uploaded by

vydoan.stella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

lOMoARcPSD|20807424

Cache Mapping

Computer Organization & Architecture (Universitas Kristen Duta Wacana)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Au cutie (vydmkde181038@[Link])
lOMoARcPSD|20807424

DIRECT MAPPING
Tiapblok dipetakan top at south barn cache
memory dongan

Main Memory
428 Byles ) Cache I 32
bytes )

BI 00

soo
-

000 I 07

0010 10

0011 It

011001


Block Causal 8 buts )

Block index
Jumlah blok : Mein size / block size , CBI )
1111 HMMMM =
128/8 = 16 blocks = 2 ⑥
blocks
↳lock
B

Jumlah line cache cache index


:
size / block size →
( ⇐ )
= 3218 = 4 lines = II lines

Di DM : LSB dari BI dicoeokfan CI


, Logica dg
MM
0 0000

a 0100 ⇒ lire 00 di cache .

8 1000
n 1100

① Dagenham CPU

Cache
tahu runner line di
bits
cache board dari MM blok mana ?

-
Tag
oo Uku ran
Tag : BI -
Ct
01 = a -
2 = 2 bits
10
Tags pegang
MSB dari BI
11

Mind BI = 0000
chssmpan di Cadre 00 → 00
Tag
=

0100 -
u -
00 → O I

Downloaded by Au cutie (vydmkde181038@[Link])


lOMoARcPSD|20807424

loutish soul :

MM ( Rd Bytes )
oooo Bo
Block sites 8 Bytes
0001 Bl

ooh Bz Cache 132 Bytes ) bits


Tag
0011 B3

0100 BM 00 BO 00

0101 B5 01 BE 01

: : 10

1000 BS 11

÷ :

1106 B12

÷ : CPU HM
Requests :
0000020
'

÷ :
0101011 beef
1111 BE
0100011 Miss
0101111
-

r
12dB
Maze
physical Address 7
- -

B →
. -

2 =

C size = 32 B =
2 B → Cache Address = 5

B site :
8 B = D →
2B
Block offset : 3

÷÷÷÷÷÷..
PA = 7
I I

= BI -

CI

O O O 00 I O
- - -

TB CI BO

thine number 00 TB 00 → dial cook = HIT


,

later ambit data dari Bo

O O I
O I O I
- - -

Yes miss maker ambit data dari MM


dicekternyatn ,

'
0100011
-

cache
-

BI BO → ke 0100 di MM tanh di
,
Downloaded by Au cutie (vydmkde181038@[Link])
lOMoARcPSD|20807424

ASSOCIATIVE MAPPING
Pernetaan ada batasan the number
tampa penarokan

Park Aem bbk data di bra otipetakan di cache line Mana


memory
.

,
pun
Couth
Main 428 B) Cache C 32 B) Bits
Memory Tag
oooo 00 MMMM 00 10

0001 01


I
Woman , .

0011
\ 11

ago

1111 Block CSB )

odor di blok ) dtnmh ( ) maker

[Link]#EEEE
Kathan Data 210010 bra fi Line O 0000
ye ,
,

sdwmh BI dicatat Oi
Tag bits .

TB = BI

Conteh Lagi :

Main 428 B) Cache C 32 B) Bits

"""""miwooo§
Memory Tag
0000 00 x 0010 - -

' noo


ooo x


0010 to v 0001
l
• 0011 " " 1111111111111 I I i

O lo O *µµ

/ :

UNWOVEN
cekdiMemo%
" ""

TB
-
BO
-
Hit

Ctu bish tahu cache


full tapi tdktahu block dreariest
tensed atom
,
yg
tank .
Maka
peru compare PA bagan TB dg
TB d- cache
trap .

→ ada A TB cache kefiza


Mihal Rea Cpu : O 0 I I 00 I → Mess
,

dan load A cadre .

Downloaded by Au cutie (vydmkde181038@[Link])


lOMoARcPSD|20807424

Terlihat cadre Sudan Maka ruemihh


full .
CPU
paler
replacement algorithm :

FIFO
-
MRU
-
LRU
-
Random

Runners ummm Acm

" "
thin
hmm
:&
"
cache

maiming

.gg?fgtEedEMS--2PA
/
CS
-

- 2A Bs =2
BO

NB =zcI
NEGI
=

,N¥=zBI

Conteh :
8kB Associative Cache BS =3 2B
panga .

Mann site :
1GB
memory
Cari TB dan
pembandy ygohbntuhkan atk
,
jwmlah
carrion !
pen
CS =
8 KB a 2B B

the
BS = zz is a 25 B → Bo ' 5 bits
2g eg. .
PA -
Bo
"
MS = 16 B a
2 B → PA a 30
bits

25 bits

28 lines
Comparator : M =

Csps
=

IIs =
a 256 comparator

Downloaded by Au cutie (vydmkde181038@[Link])


lOMoARcPSD|20807424

SET -

ASSOCIATIVE MAPPING
Associative overhead
mapping devgan ruengrrangi

Pada Aom search overhead 8AM overhead


,
.bg/ompamvg-- -

merging of
cadre lines dalam penuhsnm
can
grouping

Main
Memory
k-W_ay Seto
Cache
Grouping
K

I
-

way

Number of lines in a set


set I

Couth : 2
way set
-

selgregate cache in 2 set

@ 2 lines

Pada 8AM blocks la set dg logica Direct


, memory terhubug Mapping
MM → set

Y SAM DM t Acm
-

+ -

Acm di dalam set


pages berkuray I search dibatasi 2
comparison akan hanger pada liner
saga

Controls :

Main 428 B) Cache C 32 B ) Bits


Memory get Tag
0000 00
O
0001

91
- - - - - .
.
.
- - - -
.
.

00 I O to
I r
0011 it

O lo O
N "
# =
II a 4 bytes

)
;

SA Cadre
in
u bud . cos ,
way
IF
b- 2
set indexing
NB ,
' 'b blocks bit
I
-
-

-
=
"
Mfs
IIsets
-

Ns .
= . z sets .

Nay ez

Waka cadre
abagijadi set oh sets
Cache ( 32 B)
Di SAM kith tdkfutuh lines set

?
#
- - - - - .
.
.
- - - -
.
.

t
Downloaded by Au cutie (vydmkde181038@[Link])
lOMoARcPSD|20807424

Main 428 B) Cache C 32 B )


Memory
Set
Ahhhh

Ii
O
0001

Why Tf
- - - - - .
'
- - - -
.
.

:#
OOD
baser
000102
O I

:
I

Il 'll Block CSB )

Set held block LSD Bi O Danila


O sauna
ye
=
.
an
jyautk Set I .

Meal 0011 load be Set I

Cache C 32 B) Tag Bits


Set

I
O

irradiation
- -
.

mob
dampen at 001
I
ilthlovohehlhlll ooo .

Moral 0001 load be Sett pa

couth Rearrest Ctu

OI
LOLOL
TB
SI

HIT ( di line Kailua )

PA

DM :
NL -

-
I = II
c TB > c CI > c BO > BS

SAM Mk II
← TB I ← SI # BO 7
NS=N¥= K

To I
og
k NS =
2

as
#

.
= 2
CI -

log K
= z
SI

SI CI log k
- -

Downloaded by Au cutie (vydmkde181038@[Link])

You might also like