º»¹®/³»¿ë
¡á principle of locality
- temporal locality ¡¦ the tendency to re-use recently accessed data items
[ex] loops
- spatial locality ¡¦ the tendency to reference data items that are close to other recently
accessed items [ex] sequential execution, array or data accesses
¡á memory hierarchy
- exploiting the principle of locality
- multiple levels of memory with different speeds and sizes
memory technology
typical access time
$ per Mbyte in 1993
SRAM
8 ¢¦ 35 ns
$100 ¢¦ $400
DRAM
90 ¢¦ 120 ns
$25 ¢¦ $50
magnetic disk
10,000,000 ¢¦ 20,000,000 ns
$1 ¢¦ $2
- faster memory ¡¦ close to the processor
slower and less expensive memory ¡¦ below that
¡á 2-level model for simplicity
- upper level ¡¦ smaller, faster, more expensive
lower level ¡¦ larger, slower, less expensive
- block ¡¦ minimum unit of information transfer between the two levels (see Figure 7.2)
- hit ¡¦ when the data requested by the processor appears in some block in the upper level
miss ¡¦ when the¡¦(»ý·«)