Memory Ordering Flashcards

1
Q

What is a LSQ?

A

Load-Store Queue - used to solve dependency issues in memory accesses

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

What is the structure of an LSQ?

A

It is similar to a ROB and replaces RSes for Loads and Stores. Entries are placed in program order. Each entry has:

  1. Load vs Store ?
  2. Address
  3. Value
  4. Completed?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Store-to-Load Forwarding?

A

If we try to load something that has already been stored in the queue, we just pull that value, we don’t go to memory

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

What do we do if we have a load, but there are pending stores in the queue?

A

Get the address from memory anyways! But, when the store(s) return, it must check all the loads after it in the queue

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

How do we remove items from the LSQ?

A

On commit!

  • For load instructions, save value to register file and remove it from the queue
  • For store instructions, save value to data cache and remove it from the queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly