0 ratings0% found this document useful (0 votes) 93 views28 pagesModule 5 - Cache
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
oO |
Mopure Vi Cacne
“A cache fo & small, aod array Of memon] placed ar
9
the processor core anc mat meron] that storey pordtou
recentlp referenced matn memory
Memory Hrerarcuy ano Cacne Memoey
Processov [Reet Ee
one Reatstex File
Tightly Coupled
! Memory ever 4
ee cu
!
Maw
| "Memory roaeon t =
'
DRam
2
an Flash and other board: level
non volatile memoey
|
ye
Device eral Disk, Tape, and Network storage
1 STORAGE]
'
'
Fig 4. Memory +Hrerarcuy
Ses mete
|
{
|
at th cessor Core.
> The trnermost level of the eo fo ee
The wemor} tp Highly Coupled ty the processor. ih
g ‘ 7
Memonp i6 Known at regicter He , kkllcch provectes
sostert pout ble wenrony areas Qu He sim.> AL prena level, Memon) compooeadn Ore connected bo
Precesor Lore through Om che entecdaces, Dt tase level
Tighsty coupled memoaf (Tem) and level 4 Cache acé found,
? Premanp level v9 mata menor, I} tneluder volatile
Components Ltke sRam and DRAM :
Neon volawtle components leke Flash memory,
=> Purpore of mata memory t0 fo hold programp whsle
they Ore Tanners on a system
> Nevt level tp Setondan Storage. Large, slows, relakvely
lnexpensive mass Storage devices cuch ag deck dven os
Temovable memon| and data derived trom pextphiral devtceg
Ore tncluded.
“P Serondary memory ty used fo store unused porkvona of
Very large Programa Hak do not fb tr wratn Memory
and Programe thet are nok Crsently tmeustiog .
> Memory heeraeypthy depeads on archetectual destan
and de dole: 4 wed.
&: TOM aad seam are of Same techootogy but deffer tn
archtlectural placement.
he Tem t¢ located nthe chep, Whele cram ta located
on board.
> A cache may be eneorporated between any level tn the
heeravehy, Inthere there a segneheand. cucces tte det fecene
| blo memor) Gmponendn. $e Cache Can Emp rove Sythenn
| pecdorm@
> ae tadudes a level’ (L2) cache and vortte buller.
of Weah-speed , On- chep
La cache ta an orredt
waemony Wak temporartly holly tode ond data -Prom
O Slower level.
> Watte \oud}er ty O weny tmall Exteo bub ber that
drow Cathe .
Bupporta [Wizthen to Main memo
Lo tackhe a Vorakeah between Lt Cache aud slowes
Memo:
> Laand La caches ore abso Known ag prtmany and
Sevondacy cach.
Petateonship Ural ao cache hag with wasn meron]
System pnd Processor Lore
> Fa 2 ghows the melaktonshtp Hist acoche hag tof.
Main Wwemor rye and Processor lore.
> Lepper hall Of. tre dea & show: a block deantam ©
A Sythe withod a cache . F
L Matn memon re accened devedly boy He pro cenor
lore uate dakahjpes supported by brovenor Lore.
> Lower hal] of the tee showy & block deagram. of
O system weth a & Cache,
Ly Cache wemony fe Much Racker Vaan main memo:
& watpondy Saad bo data reores te by He wore,
> Bloke el dada trot are Aramslerced loetween Matin
Wmemont and caele Memon are known, ap Garke Linen> \deele buller ae ae 0 Aemporare, butler thal Treg
Qvostable space cache Memon.
>The cache Lranclese a cache ne to Mae Wortte bulber
ak latdh tpeed and Lhea vortte bubber dtatny th +0
ak slow Lpeed
magn MEMO
Word, Byie access
Peocesson
core
Mein
Memory
Noncached system
Word, Byte Blouc
Tranter
Occess
Processog
core 929 | rena “y
’
1 [ord Bue aes”
Slow
—
| : Cached. Sytkem
|
| Fig: Relakonshep Unad a cathe har between the
| elaktonihep Urata cathe har between
Processor tore ancl Ywata memons,* | Caches and iemor nite suet ee :
> TP a cached core Lup pords verduall memory, tt Can be
located bedween the tore anol Memonp Managenreab Uncts
(mou), 07 between Mu and physrcad memory,
> Placement ef cache bebre os apler MMU obdeemence
jhe addrentng realrn the Cocke operader 8A & how @ programm
eeu: cache memonp slo.
? Legteal cache otores data tn Virtual addres Space.
4 Tt t6 located! bebvseen procesor and Muu.
GL. processor Can access data from logteal cache cherecky
LWtthout an theogsh Mou.
b Logteal cache alte Known o0 vertual coche
Ls Physeeal cache sduren memory Uh physteal aclleanes.
b ge e¢ located between Mmu and matn mennont
i> Tor the procestor do aceen mene 5 dhe Mug mur
fort dronslage the virtual addears -to physecall addeers
before cache memord can provecte data tothe wre.
p> “The prenceple of locale o} Pod orence explarng
the Performance emprovemevt provectect by the
addlebton op a cache memory to aspidem.
NTs prenetple states that computer soflare progr:
-Me thal frequently run Smotll Loops of. code “pe
repeatedly operate en local recttong Of dlata memoryFig. chews the debference between two caches
'
Vertual Physteall
Memory ! Memory
'
offset Addafes bus
Perocecton | ; Maw Memory
'
|
Logxcal Cacue
'
\ertual | Phusteat
Memory i Memory
i
I
offset Addvess bus
|
Procerson 1 Man memory
Patcrcae CACHE
athe repealed we of game code of data ta Memory
or Hoe very near, improve Cache peclosmance .
> Repeated access fo Hie Paster Memon treproveg
| pes formance .®
Locolebhy 9 i desente
— Bs: ence alro tnown a1 prineple of
ene => a te the tendency Of & procetior to accen
«some set of memory localong repeate ex
short pertod of ne re a ey eo
D> There are two baste dypes of. Reference localety .
1) Temporal Locatehy — Reuse of spectre data anal fo
wesourceg Wwtthon a relabvely eraatl Lome duration
=) Une of data clemends wotthin
tt) Qpobtah tocatehy
relodvely close storage locat’ont ,
*K Cacue A penstecture
jus archtheckuren én the cached coree .
Ls Dem user wo
t) Von Neumann Bur achebectuct
) Howard) Bus ardheketurt.
Rus archeleduce , thece 26 ae
Thee type of cache
> Sa Mon Neumann
cathe used for drrtructeon and dleda.
|
| &% known os unthed cache .
othe Harvard arcditedure hag separote Crs bruction
and glata buses to (mprove overatt cystem perdormontt-
There ace tuo caches tan tnstruchton cache (x-cocke) and
Doda cache ( D- cache), Thee type of cache %@ Known Of
split cache -
athe fig below thew He baste archetectre of cache
by Shovstog unthed cache .
The two mata elements of coche are cache tomboller
and) cacheawierer}>The cache memory fo a dedscabed warmnory accetse ch
tn untde Catled cache Lenes ,
Ly The cache controller user alebterend porbrone 6} He
addeecs tseucd by the procenor during & neenaong
requerk AWD satel parte of cache remot.
) Baste architecture ¢ a cache’ memo
>A eimple cache memory 8@ shown on the nigh cre of
Fg Te hag three matn parte ¢
>A cltrectony chore
> DR dota section
> Staves trfor moon.
> ALL dove pardn Of cache memory are
cache lene.
Ly The coche musk Know where the talormation shored tra
Cache [ne onginalen Pron ta mata Memon},
Ly Th us a directory store to hold! the addeeu cdenbshy tag
| Iathere the Cache Wne war copted fron mata masaccoty
| “The derectony exdey iQ Known at cache dag
Is D cache memory mutt alto shore Hae data read Pe
| waea veemon ce tntormatton te held ta He eda sckou
> The size of % cache’ t¢ debenect a6 the actual code ob
ie here coral ae aca
Ls Net tncluded ta Hhe Cache size te the cache memory
| bog or _sdadius bidn .
present tor each
requted
to guppork cache-
> lakes bel are used to matndas slate indoenradhion
> Tivo status beta are 6D Male bet
= Dery bet.O
= Valid bet + Marka O cache lene ag achive, Hh cond
lve data originatiy taken cPronm mata menont ancl ip
curently avaslable 10 the procesior Core On demernd
> Darky bt / Whether or nota cathe tzne containg dota
that og ditlererd trom value Hh reprareadti fn wasn menor,
Diddvess tssved
by Processor Cache Cache
Core. Contre tlex Memory Mu.
cs
3) Deveclony
Store” status Data
Tag ——— Codd
Cache-Tag |v [idord 3 |ldsda| od] vaord 0 (hots.
la ‘oche-Tag WV | |utots word 0
u Cache Taq W [d [ods Word O|
cet :
Index ‘
. Cache-Tag |v1d [od z [nlodalbtod ish.dd
a Cache -Tag |v|d [Lsordgbteda)ind [aod 0
late \ Cache “Tag |Y\4| iors hed shod Ahaord 0
|Index o
| Address
Pata
Bus
AkB coche contibtng of 356 cache tener of four
Bo-be words
cae eeey Baste oper ation of a cache cortro/ler
> Cache controller % herccare Hind coptep code a
dota Prom mata memory to cache menor]
automahrally .
> Cache Controller eaborcepte read and wrile me
requorky before paring dhem onto the memory total
> Ib processes a request by devtcltng Me _addren of
vrequed into three Peetds.
bs Tag beth
& fd tndex Deotd
LU @ala mde bell.
=D The controller uses set tadex feeld to locate the
cache bene woithen The cache memory to hold the
mequerled code o7 data.
| Ly thin cache lene contatng cache tage ond Aeris 1
| Lthich the controller uses do deterene actual alata
| Stored -
L853) Condrotler then check vated bit to defermtae eh dhe
|
| cache Utne te ave, and compared the cache tag
| yo He & Patd of requerted address
| i, G4 both Me ek checle ne Compacts fon tucceed,
bt a cache hek,
Ly Gf esther the status check ox compariscon daste,
ted a cacke mis.
Ly On cack mess, dhe controller copter on endter cache Wns
arom motn memory 40 cache memo provide Hw
yequerted wade oy lata ty aon “re
|
|
|
|©
> The copying eo] a cache Lene El eeae nase ets
Cocke memory o¢ Known an A tache lene Lt iol
> On o cache hik, the controller Supplees tha code Or
data Asrectly Fromm Cocke Mmernor} to Hee procenor.
> Dodo tader ful) Of He addeen, requert to elect Hx
actual code or data ent cache Lire And provide tt 40
He provessor,
Kelabtonshtp Letwern Coske and Mata roemony
How mata rwemonf Maps do a derek mapped coche
Dereck maap rion.
|? ‘da a -dereck mappe
Mata memon ™ape lo a st
Oe ae ict ue earn han Cache memon ,
Vere are mang addeeses matin memon{ rat map to
Yhe same ttade locadton tn carke Peemnony
Lethe Btq. below shows -the porters Ol math memory are
chored ta coche memonf . The Maree bth belay
d cathe each addeers locaton
« \otakion tn cache mentor,
tem porartl
ace also shown im
le Sel Tndes calectg the One locadton en cache UWhere all
Vabeg tn & Memory wih an ode address of} One ay
Ore Stored.
> DotoTndex cetecty the toord | hadjisoed | By 4e Rete
> Tog feeld fp the porkton Of the address thok ip Compared
to the Gcre dag Vote found ta the Atvecbon| chore,>The Compaststou of dbs wrth dhe Cache - 4 debesontnes
Wthether the requested dolq ig ta cache. 9
> Dureng tache Ltae Ll , dhe Cache controller for word
The loading data 40 the tore at Ihe Same time t# 4 Long fy
te do cache, dhcy t& Known os date Heeowntag .
> Steeamrtya allows a proceror to Conltnue ex eatton ols le
Yre cache Controller Eile Abe rreenatning wordy tm cache Wine .
> Execkton => Process of nemovivy on cxeaking cache lene
0s park of Seruteeas & Cocke Wtee
Returning the contents Fo cache Lene ko wasn Memory
from Lee coche bo make tom dor now data hak needy
fo be loaded te cache.
> Ph dered mapped cocke th & tvgle A™) but Phere &
oo dectgn task therenk ga haveng o seoge locakeon
Qvatlabie ko shore a Value Lion main memo
L, Perec ragged cache are subject to igh level Of-
Horashiny 3 fo (roldware’) bobbten tor same locatton
en Cache memo
> The rerutk el Laeasheng th the repeaked loadeny oe
evi ckton ol Oo locke lene.
> The Pecuret shows how main vacuron] WMaPs to a
derek mapped cache.Mam Memory
OxreErerEr
: Ox FFE ROY
okF Ere F000
Ox FFFFE Roy oa
—— A KB Cache Memon}
oxFFFF COD 3 oe 7
Direct nape. oe
: Cache lag¥ [A[ Wd] Weda] Weds] eodo] 0% B20
: rom)
: x
}O% 000498>4}
lox0000 2603
OxOo0012a4; ox000
jox 00002000
we) Oxoooo0gdty |
|__} oxsoooo2ey |
©xecceec00-——
MELeM Gnesi
te Sek Index | Data Inde
3) ray aa 0
Address tssued by Processor Core
ped cache
Hq tov main memory maps to dived mar
> Concept of Theash éag
| Fig a bakes Frg 4 and overlays a stmple, Coulrivee|
Softusare procedure to demouttrate thrashing.
> The provedure cath dwo routtne vepeatedly ma
| do vokele Loop .
> Each ronkine hob the came Set endax add ress.> The devsk keme theough the loop, routine A eo placed
tn the cache ar el executes.
> When the procedure cath routine BFE ewrctn roudinr |
a cache lene at atime as th %@ loaded euto coche
and exeucted.
> On the second tme fhrough Hre loop, roulme &
veplace: routine B, and Then roudtre 1 wephaceg
routine A.
> Ripeated Cache mee~ recutl bn Contenuous evrek fon
Of the roukne tHiat not runntey Thee i@ eache Hrraskry
Ak,
Direct Mapped
: . Unrted cache
|
| la Dee Ox000024R9
(0% oco02009
;>———
RovkaB]}-_0* 00001420 jeweo
| Rewtioe® |
Oxo0001000
| Reskoe K -—.
0x 00000 +80 1
| 0x0000000)
Matn memory
0
{outers AC):
Youdine gy 7,
4
| ?
whtle (220)
| Soltware Pyocedurt
Frq 2. Thrahye,
my two func in we
deret a pped ot Te lacing cath olher on.Ser AssoCcZTATiviTy
> Tnordey 4o reduce the frequency of Hache
Set arsoctahtye tp Used.
> Cache memonp i deveded endo smatier equall unths called
CYS
> fg A’ io oa bu. ke cad; Hu cok tadext now addres
Wore Kran one tache Line- tt pomts to one cache bine tr each way,
1 Ho
> nstead of one vsay ef 256 Lenes, the cache hoo four ways
of 64 lene.
>the Pour cache lnep witth sam
the same seb , Kihech tp the oreg
> The set of cache lénep potntec tp by the set inden ane
get associadive ,
e sel index Ove satd bo be *H
in of, the name “gel faden”™
> A dota or code block from mat, memory Can be
| allocated to any of the four way: toa sek wttrout
olbetng Program behavior,
> Tho sequenttal biecks Prom main memon| dan be Sored
as cache léneg tn the same way or tuo bt] ferent woays
> The placement Of Valuee vtthtn a cet ta exelusrve to
Prevent the came code or doda blous Prom Sérmultaneousl
Oceupying +90 cache (énep ta ased, °
(Note: The dala ov code blokp trom & tpeahe locadhion
fA mata memon| Can he shored bn ony cache lhe
that £6 a member of a set-boy,
“Yps06y soa empuon 62] Op? UL veva] aye 9 PLsameRVCD ypre
rhoor snap oxy poymeodes ro wm ° dour) 947 "70 950
Voy 7779 ayy, 27? “apemosro FP fron eet ‘ayy “bi
ey
—*
OpOM]T Pom] = Pom Spey [Al Fe9-242eD 0
0 POT pom leper] per] p 4 47° erl xddNE oidd
Kony | [PRR Re FP Om sPraIp [al Py apes Led e
sod U5} j WT +
apr > :
x a opr e Pee PME PM] pl Arey 04209] x30NI 195
lope] +r ferera| Epon) pla] Fa9-eqreD]
—— | |b
f eG MPs stays IK or
QO fom feopang I bot
+ fey 7
2 fom s ;
& te
<
Tre AVONIW waNodsnod 2209 sors0r044 Faq
anIvo Daw? panes; sseapptya}
Serer:
> The mapping ol main memnor/ +oaq Cache choagen ing
>
4 x40000
oxdo00e.
ak
Or 0006
a9
tour way Set assovative cache.
Y
Any sengle locaton &2 matnr memon/ now mapa to
four Asclberent locationg tn cache.
> The bet tet Sor the 4
> The set index bet eld ta two big smaller:
addesses now may
Thin mean -feue millon math memo
te now uso beh, lacger
4o one set of four Cache lineg , instead of one millron
Addresses rapping to one locakon ,
The tere of the area of main men
te cache @ now 4kB tnvtead of AR.
4G Matn memory
Fee
lov c0c009.24
WAyZ
[cacha Tag [LV
eda ondary
huaye
Perey SES ETI
200
400]
5
Fy. Mata memory moppr.
WAYS
cache laglv[ a [isords [rsord sficord trond
, [WAXD
[cache taglv | d] words ]rrord »
st
04
to four ws.
3 ay
+3
0 processorte
et Aesoctodive cache| Tasca etog Set Desoctabrethy
\> AG the assoctattvtty of Cache controller got oF, the
| Probabelehy eo} thrashing gees down.
> Fully assovative cacke ; Mostmine sol assoccalierty
| ef a cache by dlesegning tt 0 ane wanin memons locaton
| mape to ang cache Lene -
> One methed uged by hardware desig ners do tncreage
the set assoctabtnidy @) a coche érclude content
Aaldveseable memory Loam J
> CAM user a set of comparator, +o compare the tlp
tag addres wet a cache 7
> Cam voorka Pn eppostle say a Ram works .
j by RAM produces a data When address value i gee
| 9 Com producen an addleers ¢] given data value entry
Er waren),
a
[rg Con, ollone mang more cache tag, to be compared
Stee obaneously oo Thereasing he of cache leneg tur ated.
|
> Ta Aemaror & pema40T Processor Coren, Cam é¢ Wed
The Caches tn ARMasoT aud ARMQHOT are 64 woog
Set Qssoctattve -
'> The Cache toutvoller ure the addres ag the fnpub
| to the cam aud she output selecty the Koay Corkotnteg
| die yatoreoci. Gus.
? The portion Of He vrequerted addens to ved
Oran input fo the tour Cam, thal lonpare the
enpet sag wid au cache - tags ehored th 64 WaysoO
> Tt Shere 6 a match, cache data cq proveded by
dhe cache memory.
> Lt no mate occure, & MEOH a tgnal t@ gorrated
by the memon} tontrollec.
> The controller enabley one of four coms ustva the
Set tnelex bet.
7 The indexed cam then selects a Cache Lene tn
Cache memory .
> The data tndex porkton of the wore address celecks
ter requated user, hatfosord or byte rotten He
Cache Line .
Nore:
phn’
Useng a Cam fo Locale caske-taga te the clatgn
Chotce ARM ‘mode tr tuety HRMIB0T and ARMAVOT
Processor Loren.
A chow: a block dtagrawn of an AamqHoT
> Sigs
Cache.R Hn ByrOD — G PAMHOSTO 49S feo) DAY —LoneWad Y iy
“WA? © Fue
—
0
X20NI aL
=
H
—
From PPS [ANTI Oma wane 195
xed sou CRS [aera rl
apo vy yee (P es +
rare
mg erog 2 | eaten Eft 8 |
) py
: bot
Ww
Soo
sl < ve
YIINALNOD e207 407522024 Fg
f20NF ay 209 <
u 2H 202 pense pego
Write BUFFERS
> brtle buffer 2 Avent small, ETFO tmemorf bul fea tal
temporartly holds lata that the processor toould normally
borte to matn memory,
> Ina System, welrout torte b [er = the procestor vontter
olerect ty 4o masn Wensory.
>In a system, Woeth lortle buffer =) data tp wrtten ak hegls
Speed 4) the PSO & Then emphed to slower Main Wremony
> Nrfle baller reduces the processor lame taken 40 worele tmall
bloke of sequenktal clata to main wremon).
> Effeceny of lostte buffer — Mata manon) lorile
Numbes Of Pnsfeucbtors exerted
7 bore buffer Emproves cache pecbomance , tohech occurs dun’.
Cache lene eveckions, a
> Tf He cache controller eveety Atehy cacby lin, & tortler He
cathe Lene to yrele buffer tartead of Mein memory , thug
new cachetine data well be aVatlable § procenor Uutinue
Operacttog trom Cache rvemony.
CL buffers are nok slaedly FIFO Bulhesa .
EX: PRM supports Cochescing .
> Coates tng => Merging ef wrtle operations tnto a Single
Cathe kne.
Coakesetoy alo Known ag .wrtle merging lane coltpiy hronte
Combiatng |
> Over a given bwe eaterval | of wo of, vortd
fe low, vortle buffer well ragely
> Ft wgrtte buffer doesnot fell, the runate.
to ereuste Out ef cache Memory «
6 to mata memory
Pregram Couttnuga3K] Mensveing Cache Errrcrency
Tico Jermg wed to charactecrze jhe cache Loe cconey
oLa programs
® Cache the wate.
#) Cache Misa rate.
WV
*%) Cache tet rate |
Hert vate =/ Cache heb ag
Memory requests
" Ltek rote TR number of cache http deveded by the
total number of Memory meque cts over a given
deme trherved |
tt) Cache Meso rate +
Ree ocean X100
eee wreque
NOTE +> Meron vate = (00- hth rote
P Helnake g Mrs take Can measure Teadn, writen
or both,
> Two dermp Used tu cache perdormance WMeacuremenk are
{> Ub tte tthe denne th deteeg fo accern &
memon, locakton tn cache.
1) Men penalty The Hme th Laker to lead a
cache Line from woe wremnory to
Fa OM Oe cake -
jae
pas
3
ace Penal@»
Cacne Pourcy
Three poltees thot etecmine the operation of acache ,
) Werte Poirey
) Replacement Bolte,
bt) Allocation poltas,
Wee poricy IWeite Back oR
Were THROVEU
"
Cache Wrele polrey dledermtnes thee data *%
Stored du etng Processor Lrtte Opesations”
> bthen processor Core writes +o memony , the cache
Controlles rag tivo otternatvess
8) Controller can write to boll the cache a
matn memon , ts) Vales tr both locabrows,
The ee known ap Lontte theorala
-_— sf. wrtle lo cache memony and
not update marr memony thie tp Known ag
lortdeback or Copyback
) blrele theongh :
> then Cache Controller Ureg lorite through poltey
& bonedep to both Cache and _matn memory hohen there
& a cache hed on write, curing that eee el
Main memnons Shaq Coherent of all dima.> (2. 1. pole , dache controller perform a wrrde
4o motn memon for each wrtte to cache menro
2. Wrote trough. poleey i¢ Slowes Jhon wrtleback ,
O) bette back -
eee
Do idien Cache controller uses portle back poltuy
i lrttes to vats cache data memory and ol’
to_ main memony,
> Cache lene holdp the most recent data , ne)
main memory Coutatas older data, whech hag nob
been updated.
> FL murk we one or rere of derby bttp On cache
line Status enfmae bleck
> When a cache controller Py wreleback write a value
to Cache memory, t cety olen bet true.
Groce Olerdp bet MW Hbrue, Cache Line contarns data
nol én main memorp,
5 It the cache Controlter evects @ Atehy Cache line,
tht Automatically torftien out to main Memon.
[Ls Controlles coon Hey fo prevent los of velal tafinn held
| fra cache rmeonony & hak fh waatn memory,
\> Advantay¢ “
| Frequent use of temporal local vartablen by Subroutine,
ty: local vastable that overPloua Onto a cached Work
because there are trol- enough wegitidens tn the
Teg fee Pete to hold He varrable -@”
Repincement Porscres [ Cache téne Bplatement Rleces
> Ona cache miss, the cache coutroller must select a
cache (ene rom the avarlable set ta cache memory
+o shore the new sofas froin mata memon,. the
Cache tine selected tor replacement 2g Knoon as Vick
> GE weettm tontetns valtd aud Olte ty data ,
the Controller mut iorite oltwhy data from cache to
Main memory before &-t coptep new data tuto viclin
Cache ene .
> The process of. selecking aad! replacng avichin tache
line f— known ag _evtetfon.
> "The eteategy tmplemented fm a cache controle to
d ;
Select the meet weeltm te catted tp replacenseat poli
PRM Cached Cores Cupport two replacematk polecren
» Preudorandom
ets Round robin
1) Round robto~or_ eye Fe la cement
Ales s eyes Sp
> Th simply cole cte ie next cock iin inca oe
> The selectfon algertihem uses a sequential Ineremenl
Utehin_ counter That increment cock Hime dhe cache Controller
tine.
fo replace
Oltocates a cache
> lohen viet counter sceach
te reset fo a debined base votuwe.
e6 A maximum Value,a ES SE SE ET
@
& Peeudorancomn replacement
——— a ae
r—=~—~——i™OC‘SCizsSOASCOCsisCiasiéCOitsts=CW replace,
> The setectton algortthn Ures gq neocequenbtal
tnceementing vectton Counter
> Controties Enceemendy the Wekin counter by ranchonly
ieleclena an ferent vets Gad adding thee
Value 40 He wettm counter. CT
> lohen Vecktm counter Teaches a Maximum Value,
tht weset fo a dehned bare Vole.
> Boone! roben replacecnent polecy han Qreaker predic —
-tabilesy tn an embedded slur.
1? Pound robin replacement poltay te subjed to large
Changes tn [.. Given Small chagge in Memon]
access ,
(eo Peder Tex} Book!)
Drvocarzon Potzcy oN A CacHE Mis
TLLOCAT ION Potzcy ON A CACHE Miss
"The attocalton poltcy cletirmeny then the Cache
Controller aulocatea a cache lene"
IS FARM Caches ures wo shoategten 4o atlocate a
cache bine after the occunrence of Cache MGA
1) Read- allocate
1) Rad-vortte- obecate4
» Read - aulecate on Cache metas potters ablocolea a
cache Lene only during read from matin memory .
> TF Wrekin cache lene coularng vattd dlata , thea
fe portlen fo mara memory before cache Line
ttlled tlh new data.
Tl cache Wne contarna valid data, then write
Updater the cache and wart update natn menor
tf cache polroy te bortde through .
> A wrete of new data to memory dloesnol updotee the
Content of cache memory Uatess acache line 20
allocated on a prevtout read from, paata meemory ,
tf) Read -wrle allocate On cache miss polrey ablocal,
cade lene Por etther a read ov torte Jo memonf,
operation rade fo magn memory,
> Pry load or sore
memory ,allocaten a cache lene.
tohecr og not ta cache
> On memory read the controller A166 read ablocele polty
S ap Vicktone Cache ne Contasng valed data , dene Ob
(6 usreHen to Maen memory before Cache tne ta
Petled with new data.
> TL cache lene te not vatel, t+ stmply does @ cache
lime fet.
SS Adter cache lene if felled trom main memory, the
controller writes the clatato the data ons apo
data locator wethen cache lene. ¢
> Cached Wee alto updates mam memory -
verte through Cathe .
> nema, ngia, Hamio use read allocate on meus potty.CacHes
Corrocecsor (Ss AND
inane
> Coprecersoy IF requtesp used 4 speFeatly
Conteguce aod conte! ARM cachet cores .
> Prenary CP IS treated C+ andl cg conbo! He
Setup and operation of Cache .
? Spe Cee: regeherg C¥ are Wrele only t clea
Ond flush cache .
debinep the welt
Tegtiberg CF
that deleemenap phe number
potter bate addeets D
of Linen of code or data that are locked tn cache,
> Other Cris regtoteen PUL ‘cache operat’ on