Out of Order Pipelines (Memory) Flashcards

1
Q

What are the 4 sections of program data? What is stored in each of them

A

i. text (program literals)
ii. data (global variables)
iii. heap (dynamically allocated memory and large structures)
iv. stack (local variables AND spilled registers)

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

What is an address generation unit (AGU)?

A

It is a dedicated functional unit that is used to compute the effective address (EA) before performing loads/stores

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

How do you speed up the calculation of effective addresses in out of order pipelines?

A

Using an address generation unit (AGU)

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

How are stores carried out in out-of-order pipelines?

A
  1. Calculate EA
  2. Put EA + data in store buffer
  3. After commit, retire to D-cache when D-cache is idle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are loads carried out in out-of-order pipelines?

A
  1. Calculate EA
  2. Read data from D-cache or SB
  3. Broadcast data on forwarding bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are exceptions handled in memory operations of out of order pipelines?

A

When a faulting instruction reaches the head of the ROB, any finished stores are flushed and any committed stores are permitted to retire

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

What is the difference between a finish and a commit in out-of-order execution?

A

In a finish, the data is simply broadcast on the forwarding bus. On a commit, it is saved to the destination register.

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

What are the steps for speculative loading?

A
  1. Calculate EA
  2. Use data from most recent aliased store (otherwise get data from d-cache)
  3. Add to finished load buffer (FLB)
  4. On commit, remove from FLB
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the steps for speculative storing?

A
  1. Calculate EA
  2. Put EA + data in SB
  3. On commit, if aliased load is present in FLB, squash it
  4. Retire to D-cache when idle
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the “tag” in the FLB represent?

A

The PRF (physical register file) number

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

What is the disadvantage of speculative loads?

A

Valid loads may be squashed

Edit: Invalid speculative loads must be restarted

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

What is the disadvantage of using software prefetching?

A

The compiler needs to know where to insert them in code

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

What is streaming (with reference to prefetchers)?

A

Loading consecutive blocks

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

What is striding (with reference to prefetchers)?

A

Loads with regular stride (e.g. reading a column of array stored in row-major order)

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

What is a problem with prefetching into the cache? How is it solved?

A

Erroneous prefetch “pollutes” cache with unneeded data, reducing hit rate. Can be solved by prefetching into a prefetch buffer, loading into cache only if demanded by the program

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

What are the steps for Age-Based Loading?

A

1) Calculate EA
2) Check SB for aliases between head and tail pointers and use data (Otherwise if miss, read from D-cache)
3) Broadcast on forwarding bus

17
Q

What are the steps for Age-Based storing?

A

-> Same as OOO store!
1) Calculate EA
2) Put EA + Data into SB
3) After commit retire to D-cache when idle

18
Q

What are the contents of the MRP (Memory Reference Predictor)?

A

Load instruction address, effective address (EA)/data address, stride

19
Q

How is the stride calculated in order to populate the MRP?

A

if instruction address already present, stride = newEA - oldEA
if instruction address is new, 1 (or 4 or 8), depending on the requested data size

20
Q

How is the MRP used by the Instruction Fetch Unit (IFU)?

A

The IFU checks the PC in MRP. If there is a hit, it means the instruction being fetched is a previously executed load. Add the stride to the last EA and perform a touch on the cache. The touch operation initiates a memory transfer

21
Q

What unit interacts with the MRP?

A

Instruction Fetch Unit (IFU)