|
|
|
|
|
|
Figure 5.2
Localities. (a) General locality. (b) Spatial locality. (c) Temporal locality. |
|
|
|
|
|
|
|
|
Spatial locality: If a reference has been made to item x1, then it is likely that a reference will occur somewhere in region X1 |
|
|
|
|
|
|
|
|
Temporal locality: If a sequence of reference x1, x2, x3, x4 have recently been made,then it is likely that the next reference will be one of x1, x2, x3, or x4. |
|
|
|
|
|
|
|
|
Spatial locality: References (shown as *) tend to cluster into distinct regions. The regions around xi and xj contain the recent references (or the working set). |
|
|
|
|
|
|
|
|
Temporal locality: References tend to repeat. Memory addresses n1 and n2 tend to be repeated in a seuence of references (z indicates any other reference). |
|
|
|
|
|