Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. [5] You are trying to appreciate how important the principle of locality is in justifying the use of a cache memory, so you experiment

1. [5] You are trying to appreciate how important the principle of locality is in justifying the use of a cache memory, so you experiment with a computer having an L1 data cache and a main memory (you exclusively focus on data accesses). The latencies (in CPU cycles) of the different kinds of accesses are as follows: cache hit, 5 cycle; miss penalty, 120 cycles; main memory access with cache disabled, 120 cycles.

a. When you run a program with an overall miss rate of 3%, what will the average memory access time (in CPU cycles) be?

b. Next, you run a program specifically designed to produce completely random data addresses with no locality. Toward that end, you use an array of size 2 MB (all of it fits in the main memory). Accesses to random elements of this array are continuously made (using a uniform random number generator to generate the elements indices). If your data cache size is 32 KB, what will the average memory access time be?

c. If you compare the result obtained in part (b) with the main memory access time when the cache is disabled, what can you conclude about the role of the principle of locality in justifying the use of cache memory?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions