L20 & L21 Flashcards

1
Q

How has performance optimisations, such as OOE, affected the correctness of a program?

A

Loads and stores that are issued out of order reach memory out of order. Therefore, the memory becomes inconsitent across cores.

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

What causes memory inconsistency in optimised code?

A

out-of-order stores

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

What are the 3 components of a memory consistency model?

A

 Clear definition of how stores become visible
 Clear definition of what is allowed and not
 Clear context for HW and SW optimizations

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

Explain what the release consistency model is.

A

Release consistency: contract between programmer and system
* Shared access is protected by synchronisation
* Critical section is assumed atomic
* Operation order does not have external effects

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

What are the 2 types of memory fence/barrier?

A

Full memory fence: all memory operations are complete when the fence completes

Store memory fence does the same but only for stores

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

What are the 2 different ways to code a memory fence/barrier

A

DMB = data memory barrier

LDAR = load-acquire / STLR = store-release

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

What are the differences between coherence and consistency?

A

Coherence:
 Single memory location
 All cores see the same updates
 Not interested in the relative ordering of different updates
 Done automatically by hardware

Consistency:
 About the overall system state
 Not interested in keeping data coherent
 A contract between programmer, compiler, and hardware

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

What is a way to enforce partial ordering?

A

Memory fence/barrier

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

What is functional programming? What is an important property of it?

A

Functional programming: transforms inputs to outputs by applying a set of functions

Referential transparency is an important property of functional programming
 Can replace a name with its value in the program
 No updateable state

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

What is a higher level language that can be used to translate program to data flow representation?

A

o SISAL: stream and iteration in a single assignment language

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

What is the data flow representation components?

A

 Token queue: buffering + inserting new data
 Matching store: tokens matched with instructions
 Instruction store: coding of the dataflow graph
 Processor bank: a number of processors

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

How can the dataflow representation be represented as a graph?

A

 Instructions = nodes
 Data flow = edges

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

What are examples of pure (“coarse-grained”) data flow?

A

Task-based computing
OpenMP tasking
OpenStream

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