In this exercise we look at memory locality properties of | StudySoup

Textbook Solutions for Computer Organization and Design

Chapter 5 Problem 5.1

Question

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.

\(\begin{array}{l}\text { for }(I=0 ; I<8 ; I++) \\ \text { for }(J=0 ; J<8000 ; J++) \\ \qquad A[I][J]=B[I][0]+A[J][I] ; \end{array}\)

Solution

Step 1 of 6

5.1.1. \(1 \text { byte }=8 \text { bits }\)

Here, \(32 \text { bits }=32 / 8=4 \text { bytes }\)

So a 16-byte cache block can store \(16 / 4=4\) such integers.

Subscribe to view the
full solution

Title Computer Organization and Design 5 
Author David A. Patterson
ISBN 9780124077263

In this exercise we look at memory locality properties of

Chapter 5 textbook questions

×

Login

Organize all study tools for free

Or continue with
×

Register

Sign up for access to all content on our site!

Or continue with

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back