

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CS433ug: Computer Systems Organization Spring 2007 Homework 5 Assigned: 4/ Due in class 4/
Instructions: Please write your name, NetID and an alias on your homework submissions for posting grades (If you don’t want your grades posted, then don’t write an alias). We will use this alias throughout the semester. Homeworks are due in class on the date posted.
(a) How many bits are needed for the index? tag? offset? [3 points] (b) Fill in the table and specify hits or misses and what bus activity is required (read, write, both or none). The cache is initially empty (all blocks are invalid) and addresses are in hex. [5 points] Address (Operation) Hit?. Bus Accesses 1 AD6A 2120 (Load) 2 23FE 1136 (Store) 3 AD6A 2128 (Store) 4 05AD AA1C (Load) 5 167A 4126 (Load) 6 FA41 051A (Store) 7 1234 AB20 (Store) 8 34AC 7322 (Load) 9 05AD AA12 (Store) 10 FA41 0512 (Load) (c) Fill in the first 4 sets of the cache as they would look at the end of the above operations. [4 points] Set Tag 1. V 1 D 1 Data 1 Tag 2. V 2 D 2 Data 2 0 XXXXXX XXXXXX 1 XXXXXX XXXXXX 2 XXXXXX XXXXXX 3 XXXXXX XXXXXX
Show all of your work for each of the following questions, so that students with cascading errors can still be given partial credit. Don’t forget to account for time to transfer data as well as access times and writing back dirty blocks.
(a) What is the average memory access time for instruction accesses? (b) What is the avereage memory access time for data reads? (c) What is the average memory access time for data writes? (d) What is the overall CPI, including memory accesses?
(a) What is way prediction and why does it increase cache performance? [1 point] (b) Suppose we have a direct mapped 1024 byte cache with 16 byte blocks. Consider the following code: A is a 128 element integer (4 bytes) array. //increment first half of array and decrement second half for(i = 0; i < 64; i += 2) { A[i] = A[i] + 1; A[i+64] = A[i+64] - 1; } Does this code perform well with the given cache? Why or why not? (c) Would modifying the cache to be a psuedoassociative cache improve performance of the code in part c? Why or why not? (d) Would adding a victim cache improve the performance of the code in part c? Why or why not?