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
tag
A field in a table used for a memory hierarchy that contains the address information required to identify whether the associated block in the hierarchy corresponds to a requested word
valid bit
A field in the tables of a memory hierarchy that indicates that the associated block in the hierarchy contains valid data
cache miss
A request for data from the cache that cannot be filled because the data is not present in the cache
write-through
A scheme in which writes always update both the cache and the next lower level of the memory hierarchy, ensuring that data is always consistent between the two
write buffer
A queue
that holds data while
the data is waiting to be
written to memory
write-back
A scheme that handles writes by updating values only to the block in the cache, then writing the modifi ed block to the lower level of the hierarchy when the block is replaced
split cache
A scheme in which a level of the memory hierarchy is composed of two independent caches that operate in parallel with each other, with one handling instructions and one handling data
fully associative cache
A cache structure
in which a block can be
placed in any location in
the cache
set-associative cache
A cache that has a fixed
number of locations (at
least two) where each
block can be placed