CMPSC 311 Test 2 Caching Flashcards

(44 cards)

1
Q

cache

A

—- a smaller, faster storage device that acts as a staging area for a subset of the data in a larger, slower device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

faster, smaller, larger, slower

A

fundamental idea of a memory hierarchy: For each k, the —–, —– device at level k serves as a cache for the —–, —– device at level k + 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

locality, k, k + 1, slower, bit

A

Why do memory hierarchies work? because of ——, programs tend to access the data at level — more often than they access the data at level ——. thus storage at level k + 1 can be —-, and thus larger and cheaper per —–

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

storage, bottom, data, top

A

big idea of caches: The memory hierarchy creates a large pool of —- that costs as much as the cheap storage near the —-, but that serves —- to programs at the rate of the fast storage near the ——

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

layers, processors

A

Most modern computers have multiple —— of caches to manage data passing into and out of the ——-

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

L1

A

cache levels:

—–: very fast and small, processor adjacent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

L2

A

cache levels:

—: a bit slower but often much larger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

L3

A

cache levels:

—-: larger still, maybe off chip. May be shared amongst processors in multi-core system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Memory

A

cache levels:

—–: slowest, least expensive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Instruction, data

A

—- caches are different from —– caches

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

registers, L1, L2, main memory, local secondary storage, remote secondary storage

A

memory hierarchy top to bottom order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

locality

A

caches exploit —– to improve performance, of which there are two types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

spatial locality

A

—— —-: accessed data used is tend to be close to data you already accessed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

temporal (time) locality

A

—– —- —: data that is accessed is likely to be accessed again soon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

spatial

A

two cache design strategies:

—–: cache items in blocks larger that accessed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

temporal

A

two cache design strategies:

—-: keep stuff used recently around longer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

subset, data, blocks

A

general cache concepts:

smaller, faster, more expensive memory caches a—— of the blocks.

—– is copied in block-sized transfer units

Larger, slower, cheaper memory viewed as partitioned into —–

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Hit

A

Data in block b is needed, block b is in cache: —–

19
Q

miss , memory, cache

A

data in block b is needed, block b is not in cache: —–

block b is fetched from ——

block b is stored in —-

20
Q

placement policy

A

—— —-: determines where b goes in cache

21
Q

replacement policy, victim

A

—— —–: determines which block gets evicted (called the ——)

22
Q

fully associative

A

Placement policy: anywhere = ——— ——-

23
Q

direct-mapped, mod

A

Placement policy: exactly one cache line (—– ——-).

commonly, block i is mapped to cache line (i — t) where t is the total number of lines

24
Q

n-way set associative

A

Placement policy: one of n cache lines (— – —- —)

25
cold (compulsory) miss
cache miss: ----- ----- ---: cold misses occur because the cache is empty
26
capacity miss, working set
cache miss: ---- --: occurs when the set of active cache blocks (----- ---) is larger than the cache
27
conflict miss, set-associative, direct mapping
cache miss: --- ----- (----- --- and ---- ----- only) Most cache limits blocks at level k + 1 to a small subset (sometimes a singleton) of the block positions at level k. Eg Block i at level k+1 must be placed in block (i mod 4) at level k.
28
conflict misses
------ ---- occur when the level k cache is large enough, but multiple data objects all map to the same level k block.
29
evict
When your cache is full and you acquire a new value, you must ---- a previously stored value.
30
cache eviction policy
Performance of cache is determined by how smart you are in evicting values, known as ----- ----- ----
31
lest recently used (LRU)
popular policies: ------ ---- ----: eject the value that has been in the cache the longest without being accessed
32
least frequently used (LFU)
popular policies: ----- ----- ----: eject the value that accessed the least number of times
33
first in first out (FIFO)
popular policies: --- --- ----- ----: eject the same order they come in
34
hit performance, costs, working, workload
Policy efficiency is measured by the ----- ------- (how often is something asked for and found) and measured ------ determined by ----- set and ------
35
cache hit
A ----- ---- is when the referenced information is served out of the cache
36
cache miss
a ----- ---- occurs referenced information cannot be served out of the cache
37
hit ratio
the -- ---- is the #cache hits/ # total accesses
38
#cache hits/ #total accesses
hit ratio is : ------
39
hit ratio
Note that the efficiency of a cache is almost entirely determined by the --- ----
40
average memory access time
The ---- ---- ---- --- can be calculated: memory latency -= hit cost + p(miss) * miss penalty
41
memory latency = hit cost + p(miss) * miss penalty
average memory access time equation : ----------
42
hit cost
avg mem access time equation: ------ ---: is the cost to access the cache
43
miss penalty
avg mem access time equation: | ---- ---- is the cost to serve out of main memory
44
P(miss)
avg mem access time equation: | ------- is the probability of a cache access resulting in a miss e.g., 1 - hit ratio