Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( cache ) Consider the following code: ( 2 0 points ) ( 1 ) Assume that the system has a 8 1 9 2

(cache) Consider the following code: (20 points)
(1) Assume that the system has a 8192-byte, direct-mapped data cache with 16-byte blocks.
Assuming that the cache starts from initial state (i.e. initially empty), what is the series of data
cache hits and misses for the above code (i.e. number of misses and number of hits)? Assume
that the ints are 32-bits.
(2) Assume that an iteration of a loop in which the load hits takes 10 cycles but that an iteration of
a loop in which the load misses takes 100 cycles. What is the execution time (cycles) of this
code with the aforementioned cache?
(3) Repeat part (1) except assume that the cache is 2-way set associative with an LRU replacement
policy and 16-byte sets (8-byte blocks).
(4) Repeat part (2) using the cache described in part (3). Is the direct-mapped or the set-associative
cache better?
image text in transcribed

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

What is tax planning?

Answered: 1 week ago

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago