100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
Final Exam CDA4101 Review 2022/2023 €7,90   In winkelwagen

Tentamen (uitwerkingen)

Final Exam CDA4101 Review 2022/2023

 3 keer bekeken  0 keer verkocht
  • Vak
  • Instelling

5.4 Recall that we have two write policies and write allocation policies, and their combinations can be implemented either in L1 or L2 cache. Assume the following choices for L1 and L2 caches: 5.4.1 [5] <COD §§5.3, 5.8> Buffers are employed between different levels of memory hierarchy...

[Meer zien]

Voorbeeld 2 van de 8  pagina's

  • 4 augustus 2022
  • 8
  • 2022/2023
  • Tentamen (uitwerkingen)
  • Vragen en antwoorden
avatar-seller
Final Exam CDA4101 Review 2022/2023
5.1 In this exercise we look at memory locality properties of matrix computation. The
following code is written in C, where elements within the same row are stored
contiguously. Assume each word is a 32-bit integer.

for (I = 0; I < 8; I++)
for (J = 0; J < 8000; J++)
A[I][J] = B[I][0] + A[J][I];

5.1.1 [5] <COD §5.1> How many 32-bit integers can be stored in a 16-byte cache
block?
5.1.2 [5] <COD §5.1> References to which variables exhibit temporal locality?
5.1.3 [5] <COD §5.1> References to which variables exhibit spatial locality?

Locality is affected by both the reference order and data layout. The same computation
can also be written below in MATLAB, which differs from C by storing matrix elements
within the same column contiguously in memory.

for I = 1:8
for J = 1:8000
A(I,J) = B(I,0) + A(J,I);
end
end

5.1.4 [5] <COD §5.1> How many 16-byte cache blocks are needed to store all 32-bit
matrix elements being referenced?
5.1.5 [5] <COD §5.1> References to which variables exhibit temporal locality?
5.1.6 [5] <COD §5.1> References to which variables exhibit spatial locality? - ANSWER
5.1.1 [5] <COD §5.1> How many 32-bit integers can be stored in a 16-byte cache
block?

https://drive.google.com/file/d/1LhsMKJsc48EbXZqL7HsSIbF23FRAkfQR/view?
usp=sharing


5.1.2 [5] <COD §5.1> References to which variables exhibit temporal locality?


Locality is affected by both the reference order and data layout. The same computation
can also be written below in MATLAB, which differs from C by storing matrix elements
within the same column contiguously in memory.

for I = 1:8
for J = 1:8000
A(I,J) = B(I,0) + A(J,I);
end
end

, Final Exam CDA4101 Review 2022/2023
5.1.4 [5] <COD §5.1> How many 16-byte cache blocks are needed to store all 32-bit
matrix elements being referenced?

https://docs.google.com/document/d/
1jx4qQAGnxk_OoQo7sunqA3q52AUvcMSEIy4OLyBIKFE/edit?usp=sharing

5.1.5 [5] <COD §5.1> References to which variables exhibit temporal locality?

Locality Quiz - Georgia Tech - HPCA: Part 3 - ANSWER
https://www.youtube.com/watch?v=z9LHetPW0Vs&list=PLn4mZps3Wx0_6thXcBr99-
Y4n49t_lIb0&index=2&t=0s

5.2 Caches are important to providing a high-performance memory hierarchy to
processors. Below is a list of 32-bit memory address references, given as word
addresses.3, 180, 43, 2, 191, 88, 190, 14, 181, 44, 186, 253
5.2.1 [10] <COD §5.3> For each of these references, identify the binary address, the
tag, and the index given a direct-mapped cache with 16 one-word blocks. Also list if
each reference is a hit or a miss, assuming the cache is initially empty.
5.2.2 [10] <COD §5.3> For each of these references, identify the binary address, the
tag, and the index given a direct-mapped cache with two-word blocks and a total size of
8 blocks. Also list if each reference is a hit or a miss, assuming the cache is initially
empty. - ANSWER 5.2.1 [10] <COD §5.3> For each of these references, identify the
binary address, the tag, and the index given a direct-mapped cache with 16 one-word
blocks. Also list if each reference is a hit or a miss, assuming the cache is initially
empty.

https://drive.google.com/file/d/1584dgRGktv0oeJysRWcdYaJwcx37RepX/view?
usp=sharing

5.2.2 [10] <COD §5.3> For each of these references, identify the binary address, the
tag, and the index given a direct-mapped cache with two-word blocks and a total size of
8 blocks. Also list if each reference is a hit or a miss, assuming the cache is initially
empty.

https://drive.google.com/file/d/15Th2yjeNU_zyNCQva_dsk35arcHaR0lJ/view?
usp=sharing

5.2 Caches are important to providing a high-performance memory hierarchy to
processors. Below is a list of 32-bit memory address references, given as word
addresses.
3, 180, 43, 2, 191, 88, 190, 14, 181, 44, 186, 253

5.2.3 You are asked to optimize a cache design for the given references. There are
three direct-mapped cache designs possible, all with a total of 8 words of data: C1 has
1-word blocks, C2 has 2-word blocks, and C3 has 4-word blocks. In terms of miss rate,

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

√  	Verzekerd van kwaliteit door reviews

√ Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, Bancontact of creditcard voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper millyphilip. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €7,90. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 72042 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€7,90
  • (0)
  Kopen