This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 16-byte cache line holds two contiguous algae position structures. Each loop visits these structures in memory order, reading one integer element each time. So the pattern for each loop is: miss, hit, miss, hit, and so on. Notice that for this problem, we could have predicted the miss rate without actually enumerating the total number of reads and misses. A. What is the total number of read accesses? 512 reads. B. What is the total number of read accesses that miss in the cache? 256 misses. C. What is the miss rate?
¾ ½¾ ¼± . Problem 6.16 Solution: [Pg. 326] The key to this problem is noticing that the cache can only hold ½ ¾ of the array. So the column-wise scan of the second half of the array evicts the lines that were loaded during the scan of the ﬁrst half. For example, reading the ﬁrst element of grid evicts the line that was loaded when we read elements from grid. This line also contained grid). So when we begin scanning the next column, the reference to the...
View Full Document