Memory Hierarchy and Cache Architecture

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/35

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering memory hierarchy concepts, cache structures, memory technologies, cache miss models, formulas, and performance optimizations.

36 Terms

1
New cards

Locality

The architectural principle that programs access a relatively small portion of their address space at any instance of time.

2
New cards

Temporal Locality

The principle stating that if an item was referenced, it will probably be referenced again soon.

3
New cards

Spatial Locality

The principle stating that if an item is referenced, items with close addresses tend to be referenced soon.

4
New cards

Memory Hierarchy

A multi-level storage structure where, as the distance from the processor increases, the size of the memories and the access time both increase.

<p>A multi-level storage structure where, as the distance from the processor increases, the size of the memories and the access time both increase.</p>
5
New cards

Block (or Line)

The minimum unit of information that can be either present or not present in a cache.

<p>The minimum unit of information that can be either present or not present in a cache.</p>
6
New cards

Hit Rate

The fraction of memory accesses found in a specified level of the memory hierarchy.

7
New cards

Miss Rate

The fraction of memory accesses not found in a specified level of the memory hierarchy, calculated as 1−Hit rate1 - \text{Hit rate}.

8
New cards

Hit Time

The time required to access a level of the memory hierarchy, including the time needed to determine whether the access is a hit or miss.

9
New cards

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 between levels, insert it into the missing level, and pass it to the requester.

10
New cards

SRAM (Static Random Access Memory)

Integrated circuits configured as memory arrays with single access ports for read or write, placed closest to the processor (caches) with typical access times of 0.5–2.5 ns0.5\text{--}2.5\,\text{ns} and costing approximately \\500\text{--}\\10001000 per GiB in 2020.

11
New cards

DRAM (Dynamic Random Access Memory)

Main memory technology where values kept in a cell are stored as charge in a capacitor and accessed via transistors, requiring periodic refreshes (re-writing), with typical access times of 50–70 ns50\text{--}70\,\text{ns} and costing approximately \\3\text{--}\\66 per GiB in 2020.

12
New cards

Flash Semiconductor Memory

A type of electrically erasable programmable read-only memory (EEPROM) with typical access times of 5,000–50,000 ns5{,}000\text{--}50{,}000\,\text{ns} and costing approximately \\0.06\text{--}\\0.120.12 per GiB in 2020.

13
New cards

Magnetic Disk

A magnetic hard disk consisting of platters that rotate on a spindle at 5,4005{,}400 to 15,00015{,}000 revolutions per minute, with access times of 5,000,000–20,000,000 ns5{,}000{,}000\text{--}20{,}000{,}000\,\text{ns} and costing approximately \\0.01\text{--}\\0.020.02 per GiB in 2020.

14
New cards

Track

One of thousands of concentric circles that make up the surface of a magnetic disk platter.

15
New cards

Sector

One of the segments that make up a track on a magnetic disk; it represents the smallest amount of information that is read or written on a disk.

16
New cards

Seek

The mechanical process of positioning a read/write head over the proper track on a magnetic disk platter.

17
New cards

Rotational Latency (Rotational Delay)

The time required for the desired sector of a disk to rotate under the read/write head, usually assumed to be half the rotation time.

18
New cards

Tag

An address field stored alongside each cache block that indicates which memory address the cached block corresponds to.

19
New cards

Set Associative Cache

A cache structure where blocks are grouped into sets, and any block mapped to a set can be placed anywhere within that set.

20
New cards

nn-Way Set Associative Cache

A cache placement scheme where each set consists of exactly nn block locations.

21
New cards

Direct-Mapped Cache

A cache organization that has only one block per set, meaning each main memory block maps to exactly one predetermined location in the cache.

22
New cards

Fully Associative Cache

A cache organization that contains only one single set, allowing memory blocks to be placed anywhere in the cache.

23
New cards

Write-Through Cache

A cache writing scheme that updates the item in the cache and simultaneously writes through to update main memory.

24
New cards

Write-Back Cache

A cache writing scheme that only updates the copy of data in the cache, deferring updates to main memory until the block is replaced.

25
New cards

Write Buffer

A hardware buffer used by both write-through and write-back caches that holds data waiting to be written to memory, allowing the processor to proceed immediately.

26
New cards

Compulsory Miss

A cache miss that occurs on the first access to a block, which occurs even if the cache were infinite in size.

27
New cards

Capacity Miss

A cache miss that occurs when the cache cannot contain all the blocks needed during the execution of a program.

28
New cards

Conflict Miss

A cache miss occurring in direct-mapped or set-associative caches when multiple blocks map to the same set and discard an existing block that is later retrieved.

29
New cards

Coherency Miss

The special fourth category of cache misses caused by cache flushes or invalidations required to keep multiple caches coherent in a multiprocessor system.

30
New cards

Misses per Instruction (MPI)

A cache performance metric calculated as: MissesInstruction=Miss rate×Memory accessesInstruction\frac{\text{Misses}}{\text{Instruction}} = \text{Miss rate} \times \frac{\text{Memory accesses}}{\text{Instruction}}.

31
New cards

Average Memory Access Time (AMAT)

A metric defined as: AMAT=Hit time+(Miss rate×Miss penalty)\text{AMAT} = \text{Hit time} + (\text{Miss rate} \times \text{Miss penalty}).

32
New cards

Virtual Index / Physical Tag Method

A cache optimization that uses the page offset (identical in virtual and physical addresses) to index the cache, removing Translation Lookaside Buffer (TLB) access from the critical path to reduce hit time.

33
New cards

Offset Bits

The lower portion of a physical memory address calculated as: Offset Bits=log⁡2(Block size in bytes)\text{Offset Bits} = \log_2(\text{Block size in bytes}).

34
New cards

Index Bits

The portion of a physical memory address calculated as: Index Bits=log⁡2(Number of cache blocks)\text{Index Bits} = \log_2(\text{Number of cache blocks}).

35
New cards

Tag Bits

The high-order portion of a physical address calculated as: Tag Bits=B−(Index Bits+Offset Bits)\text{Tag Bits} = B - (\text{Index Bits} + \text{Offset Bits}), where BB is the total number of physical address bits.

36
New cards

Direct Mapping Cache Index Formula

The formula used to determine a block's cache location: Cache Index=A(modTotal cache blocks)\text{Cache Index} = A \pmod{\text{Total cache blocks}}, where AA is the main memory block address.