Memory Consistency Flashcards

1
Q

What is memory consistency?

A

Memory consistency defines the order of access to different addresses.

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

When do memory consistency issues happen?

A

When the processor reorders instructions and interleaved instructions from different cores can result in an output that is not possible if executed in program order

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

What is sequential consistency?

A

The result of any execution should be as if accesses executed by each processor were executed in-order and accesses among different processors were arbitrarily interleaved

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

How to implement sequential consistency

A
  • Core can reorder loads, detects when there is a problem and fix it
  • Use ROB to keep track of program order
  • If there is a write to an address that we loaded out of order, then can drop all the entries in the ROB after that load (since it hasn’t been committed yet)
  • Must snoop traffic on bus for any writes to an address that we loaded out of order
  • Only way to get memory inconsistency is to have a write to an address that we loaded out of order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is relaxed consistency?

A

Class of consistency that is more relaxed than sequential, but better than nothing.

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

What are the 4 types of ordering?

A

WR A -> WR B
WR A -> RD B
RD A -> WR B
RD A -> RD B

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

What is the MSYNC instruction?

A

special x86 instruction that guarantees that all accesses are completed before MSYNC, and that MSYNC happens before all subsequent accesses

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

What is a data-race free program?

A

Use barriers to achieve sequential consistency, even if hardware is not using it

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