Qhov txawv ntawm L1 thiab L2 Cache

Qhov txawv ntawm L1 thiab L2 Cache
Qhov txawv ntawm L1 thiab L2 Cache

Video: Qhov txawv ntawm L1 thiab L2 Cache

Video: Qhov txawv ntawm L1 thiab L2 Cache
Video: Lesson 31-Math Analysis -Volume 1 2024, Lub Xya hli ntuj
Anonim

L1 vs L2 Cache

Cache nco yog lub cim xeeb tshwj xeeb siv los ntawm CPU (Central Processing Unit) ntawm lub khoos phis tawj rau lub hom phiaj txo qis lub sijhawm nruab nrab uas yuav tsum tau nkag mus rau lub cim xeeb. Cache nco yog qhov me me thiab tseem yog lub cim xeeb nrawm dua, uas khaws cov ntaub ntawv feem ntau nkag mus ntawm lub cim xeeb loj. Thaum muaj kev thov rau lub cim xeeb nyeem, cache nco yog kuaj xyuas seb cov ntaub ntawv ntawd puas muaj nyob hauv cache nco. Yog tias cov ntaub ntawv ntawd nyob hauv lub cim xeeb cache, ces tsis tas yuav nkag mus rau lub cim xeeb tseem ceeb (uas yuav siv sijhawm ntev dua kom nkag tau), yog li ua rau lub sijhawm nruab nrab lub cim xeeb nkag tau me dua. Feem ntau, muaj cais caches rau cov ntaub ntawv thiab cov lus qhia. Cov ntaub ntawv cache feem ntau yog teeb tsa hauv hierarchy ntawm qib cache (qee zaum hu ua multilevel caches). L1 (Level 1) thiab L2 (Level 2) yog cov caches saum toj kawg nkaus hauv qhov hierarchy ntawm caches. L1 yog qhov ze tshaj cache rau lub cim xeeb tseem ceeb thiab yog lub cache uas raug kuaj ua ntej. L2 cache yog qhov txuas ntxiv hauv kab thiab yog qhov thib ob ze tshaj plaws rau lub cim xeeb loj. L1 thiab L2 sib txawv hauv kev nkag tau nrawm, qhov chaw, qhov loj thiab tus nqi.

L1 Cache

L1 cache (tseem hu ua thawj cache lossis Theem 1 cache) yog cov cache saum toj kawg nkaus hauv hierarchy ntawm qib cache ntawm CPU. Nws yog qhov ceev tshaj cache hauv hierarchy. Nws muaj qhov me me thiab qeeb me me (zero wait-state) vim nws feem ntau ua rau hauv lub nti. SRAM (Static Random Access Memory) yog siv rau kev siv L1.

L2 Cache

L2 cache (tseem hu ua Secondary cache lossis Theem 2 cache) yog lub cache uas nyob ib sab ntawm L1 hauv cache hierarchy. L2 feem ntau nkag mus tsuas yog tias cov ntaub ntawv nrhiav tsis pom hauv L1. L2 feem ntau yog siv los txuas qhov sib txawv ntawm qhov kev ua tau zoo ntawm lub processor thiab lub cim xeeb. L2 feem ntau yog siv los ntawm DRAM (Dynamic Random Access Memory). Feem ntau, L2 yog soldered rau ntawm lub motherboard ze rau lub nti (tab sis tsis yog ntawm lub nti nws tus kheej), tab sis qee cov processors zoo li Pentium Pro deviated los ntawm tus qauv no.

Qhov txawv ntawm L1 thiab L2 Cache yog dab tsi?

Txawm tias ob qho tib si L1 thiab L2 yog cache nco lawv muaj qhov sib txawv tseem ceeb. L1 thiab L2 yog thawj thiab thib ob cache hauv hierarchy ntawm qib cache. L1 muaj lub cim xeeb me dua li L2. Tsis tas li, L1 tuaj yeem nkag tau sai dua L2. L2 tsuas yog nkag tau yog tias cov ntaub ntawv thov tsis pom hauv L1. L1 feem ntau yog nyob rau hauv-ua rau lub nti, thaum L2 yog soldered ntawm lub motherboard heev ze rau lub nti. Yog li ntawd, L1 muaj qhov qeeb me ntsis piv rau L2. Vim tias L1 yog siv los ntawm SRAM thiab L2 yog siv DRAM, L1 tsis xav tau kev hloov tshiab, thaum L2 yuav tsum tau kho dua tshiab. Yog tias cov caches nruj me ntsis suav nrog, tag nrho cov ntaub ntawv hauv L1 tuaj yeem pom hauv L2 thiab. Txawm li cas los xij, yog tias cov caches tshwj xeeb, tib cov ntaub ntawv yuav tsis muaj nyob hauv L1 thiab L2.

Pom zoo: