CMPSC 311 Test 2 Caching Flashcards

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
Q

cold (compulsory) miss

A

cache miss:

—– —– —: cold misses occur because the cache is empty

26
Q

capacity miss, working set

A

cache miss:

—- –: occurs when the set of active cache blocks (—– —) is larger than the cache

27
Q

conflict miss, set-associative, direct mapping

A

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
Q

conflict misses

A

—— —- occur when the level k cache is large enough, but multiple data objects all map to the same level k block.

29
Q

evict

A

When your cache is full and you acquire a new value, you must —- a previously stored value.

30
Q

cache eviction policy

A

Performance of cache is determined by how smart you are in evicting values, known as —– —– —-

31
Q

lest recently used (LRU)

A

popular policies:

—— —- —-: eject the value that has been in the cache the longest without being accessed

32
Q

least frequently used (LFU)

A

popular policies:

—– —– —-: eject the value that accessed the least number of times

33
Q

first in first out (FIFO)

A

popular policies:

— — —– —-: eject the same order they come in

34
Q

hit performance, costs, working, workload

A

Policy efficiency is measured by the —– ——- (how often is something asked for and found) and measured ——

determined by —– set and ——

35
Q

cache hit

A

A —– —- is when the referenced information is served out of the cache

36
Q

cache miss

A

a —– —- occurs referenced information cannot be served out of the cache

37
Q

hit ratio

A

the – —- is the #cache hits/ # total accesses

38
Q

cache hits/ #total accesses

A

hit ratio is : ——

39
Q

hit ratio

A

Note that the efficiency of a cache is almost entirely determined by the — —-

40
Q

average memory access time

A

The —- —- —- — can be calculated: memory latency -= hit cost + p(miss) * miss penalty

41
Q

memory latency = hit cost + p(miss) * miss penalty

A

average memory access time equation : ———-

42
Q

hit cost

A

avg mem access time equation:

—— —: is the cost to access the cache

43
Q

miss penalty

A

avg mem access time equation:

—- —- is the cost to serve out of main memory

44
Q

P(miss)

A

avg mem access time equation:

——- is the probability of a cache access resulting in a miss e.g., 1 - hit ratio