Pipelining Flashcards

1
Q

What is a pipeline stall?

A

When a pipelining steps fails and must be repeated, causing a stall in the instructions behind it, and a gap between it and the instruction ahead

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

What causes pipeline stalls?

A

Control dependencies and data dependencies

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

What are the types of data dependencies?

A

RAW (true), WAW, WAR

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

What is a WAW?

A

when two instructions write to the same register, the second one must be written second, otherwise subsequent reads to that address will see the wrong value

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

What is a WAR?

A

When an instruction writes over an address read by another instruction, the write must happen second

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

What is a hazard? Who causes them?

A

When a dependency in the pipeline can cause an incorrect execution. This is a property of the processor

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

Are dependencies hazards?

A

not necessarily, they are a property of the program.

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

What are our options when we detect a hazard?

A
  1. flush dependent instructions (control deps only)
  2. stall dependent instructions
  3. Fix values read by dependent instructions (“forward”, and doesn’t always work)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the relationship between number of stages and performance?

A

More stages == higher CPI (more hazards), but lower cycle time (less work per stage)

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