Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

. What is a hardware cache? 2. What is a memory hierarchy? 3. Why do modern proc

ID: 3713610 • Letter: #

Question

. What is a hardware cache? 2. What is a memory hierarchy? 3. Why do modern processors have caches? 4. Which of the following computer systems use caches in their memory hierarchy? O mobile phones laptops O game consoles O workstation desktops O high-end servers (ones you would find in a Google/Facebook/Microsoft datacenter) 5. What is temporal locality? What is spatial locality? 6. Consider the following code snippet: How does this code snippet demonstrate examples of temporal and spatial locality? Be sure to consider memory references for both data and instructions. 7. All memory hierarchies have levels whereby either hardware or software determines whether to bring in data from the lower level to the higher level. What governs whether hardware or software is in charge of data movement? Name two levels where software is in charge. Which software pieces are in charge of data movement here? 8. What are split private caches? What are unified private caches? What are unified shared caches? Provide examples of hardware caches of each type with information about their relative access latency (in cyeles) and size in bytes) 9. Why do hardware caches help performance? 10. What is the difference between a direct-mapped cache, a fully-associative cache, and a set-associative 11. Why do we store multiple bytes in a cache line/block/way? What is the typical cache line size on most 12. How do you caleulate cold versus confliet versus capacity misses? cache? For which of these caches do replacement policies matter?

Explanation / Answer

1) A hardware cache memory, is used by the computer microprocessor to quickly access the data from the memory. Basically, cache memory resides very close to the processor core and stores program instruction which are very frequently used by software during operations. And, the fact that they are the quickest, it increases the overall speed of our software program.

2) Memory hierarchy is the categorization of computer storage based on response time and other linked factors. A high performance computer system consists of a balanced combination of members of memory hierarchy based on the size and capabilities of each component.
Fastest being cache, then RAM and slowest being the disk drives.

3) A processor cache is very important part of the computer architecture. A processor can process instructions only as quickly as it can be fed. The hard disk drives and RAM are very slow compared to processors and this leads to missing processing cycles and due to this the calculation doesn't occur until the next cycle. Now, cache works on many levels on a modern CPU. The cache stores the relevant most used information which play off to improve the system performance.

4) All of the given options.
With the growing power and thurst for computational speed and advancement of hardwares, caches are being used on almost all of the computer related systems to balance the processor speed with the memory speed.

5) locality of reference is the technique where based on memory access patterns, same or related storage locations are frequently accessed.
Spatial locality - is a concept where a resource is more likely to be referenced if a resource near it was recently referenced.
Temporal locality - is a concept where a resource which was recently referenced at one point in the time will again be referenced in the near future.