Chapter 5 Flashcards
Principle of locality
Temporal Locality and Spatial Locality
Temporal Locality
Items accessed recently are likely to be accessed again soon
- instructions in loop
- induction variable
Spatial Locality
Items near those accessed recently are likely to be accessed soon
- sequential instruction access
- array data
Taking Advantage of Locality
- memory hierarchy
- store on disk
- copy recently accessed(and nearby) items from disk to smaller DRAM memory
- Main Memory
- copy more recently accessed(and nearby) items from the DRAM to smaller SRAM memory
- Cache memory attached to the CPU
Block(aka line)
unit of copying
-may be multiple words
Memory hierarchy
a structure that uses multiple levels of memories; as the distance from the processor increases, the size of the memories and the access time both increase.
hit rate
the fraction of memory accesses found in a level of the memory hierarchy
miss rate
Th e fraction
of memory accesses not
found in a level of the
memory hierarchy
hit time
Th e time required to access a level of the memory hierarchy, including the time needed to determine whether the access is a hit or a miss
miss penalty
The time required to fetch a block into a level of the memory hierarchy from the lower level, including the time to access the block, transmit it from one level to the other, insert it in the level that experienced the miss, and then pass the block to the requestor
track
One of thousands
of concentric circles that
makes up the surface of a
magnetic disk
sector
One of the segments that make up a track on a magnetic disk; a sector is the smallest amount of information that is read or written on a disk
seek
Th e process of
positioning a read/write
head over the proper
track on a disk
rotational latency
Th e time required for the desired sector of a disk to rotate under the read/write head; usually assumed to be half the rotation time
direct-mapped cache
A cache structure in which each memory location is mapped to exactly one location in the cache