Presentation is loading. Please wait.

Presentation is loading. Please wait.

6/12/2015Page 1 Exploiting Memory Hierarchy Chapter 7 B.Ramamurthy.

Similar presentations


Presentation on theme: "6/12/2015Page 1 Exploiting Memory Hierarchy Chapter 7 B.Ramamurthy."— Presentation transcript:

1 6/12/2015Page 1 Exploiting Memory Hierarchy Chapter 7 B.Ramamurthy

2 6/12/2015Page 2 Introduction Memory refers to storage needed by the kernel, the other components of the operating system and the user programs. In a multi-processing, multi-user system, the structure of the memory is quite complex. Efficient memory management is very critical for good performance of the entire system. In this discussion we will study the important role the levels of cache memory play in the processor performance.

3 6/12/2015Page 3 Locality Temporal locality: Addresses that are referenced at some time Ts will be accessed in the near future (Ts + delta_time) with high probability. Example : Execution in a loop. Spatial locality: Items whose addresses are near one another tend to be referenced close together in time. Example: Accessing array elements. How can we exploit this characteristics of programs? Keep only the current locality in the main memory. Need not keep the entire program in the main memory.

4 Memory Hierarchy CPU Registers CPU on-chip cache level1 CPU on-chip cache level2 CPU off-chip cache Main memory – on board System level – off board Secondary memory – on disk 6/12/2015Page 4

5 Direct-mapped Cache See fig. 7.5, 7.6, 7.7 Content addressable memory 6/12/2015Page 5

6 Direct Mapped Cache: the Idea 6/12/2015Page 6 Cache Main Memory All addresses with LSB 001 will map to purple cache slot All addresses with LSB 101 will map to blue cache slot And so on

7 Cache Organization Content addressable memory Fully associative Set associative Fig.7.7 6/12/2015Page 7 Regular Memory Organization Cache Memory Organization Address Cache Memory Organization Data

8 Cache organization Fig.7.7 Valid bit, tag, index, circuitry for comparison of tags. 6/12/2015Page 8 20 bits tag10 bits index2bit Byte of the word selection


Download ppt "6/12/2015Page 1 Exploiting Memory Hierarchy Chapter 7 B.Ramamurthy."

Similar presentations


Ads by Google