Assignment2

Assignment2 - optimal cache placement policy. for (i = 0; i...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment #2 Due 17/9/2009 1:30 pm Reading assignment 1. Read Chapter 2. Exercises 1- Consider a memory system with a level 1 cache of 32 KB and DRAM of 512 MB with the processor operating at 1 GHz. The latency to L1 cache is one cycle and the latency to DRAM is 100 cycles. In each memory cycle, the processor fetches four words (cache line size is four words). What is the peak achievable performance of a dot product of two vectors? Note: Where necessary, assume an
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: optimal cache placement policy. for (i = 0; i < dim; i++) dot_prod += a[i] * b[i]; 2- Consider the problem of multiplying two dense matrices of dimension 4K x 4K(Each row of the matrix takes 16 KB of storage). What is the peak achievable performance using a three-loop dot-product based formulation? (Assume that matrices are laid out in a row-major fashion.) for (i = 0; i < dim; i++) for (j = 0; i < dim; j++) for (k = 0; k < dim; k++) c[i][j] += a[i][k] * b[k][j];...
View Full Document

Ask a homework question - tutors are online