100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Final Exam CDA4101 Review 2022/2023 $7.99   Add to cart

Exam (elaborations)

Final Exam CDA4101 Review 2022/2023

 3 views  0 purchase
  • Course
  • Institution

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...

[Show more]

Preview 2 out of 8  pages

  • August 4, 2022
  • 8
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
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,

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller millyphilip. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72042 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart