Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider an array stored in memory from address 6 6000 int array 4 4 0 1 2 3 4 5 6 7 8 9 10

image text in transcribed
image text in transcribed

Consider an array stored in memory from address 6 6000 int array 4 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Suppose the machine implements a fully associative cache only one set bit with a single line of 16 bytes The memory addresses can then be partitioned into 2 tag bits and 4 block offset bits For example the memory address 6 b101100 would be formatted as tag bits 2 b10 and block offset bits 4 b1100 a Version 1 Suppose the array is accessed with for loops below and the cache is cold to start completely empty How many caches misses would each for loop incur int sum 0 for int i 0 i 4 i for int j 0 j 4 j sum array i j to 6 b Version 2 is declared as follows int sum 0 for int j 0 j 4 j for int i 0 i 4 i sum array i j

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Calculus Early Transcendentals

Authors: James Stewart

7th edition

538497904, 978-0538497909

Students also viewed these Mathematics questions