Branch prediction and superscalar Flashcards

1
Q

How to speed up processors without using extra transistors?

A

By putting multiple cpu cores on a chip

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

What is symmetric multiprocessing?

A

All CPU cores on a chip are equal

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

How many processor cores and threads does skylake have

A

Skylake has 28 processor cores and 56 threads

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

What is the branch delay slot?

A

MIPS 32 has a feature called branch delay slot and is executed regardless of whether the jump happened.

There are 2 things that can be done inside this branch instruction

  • Execute some instruction that is needed to be done anyway regardless of the branching
  • Do a nop instruction.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the different ways to do branch prediction

A
  1. Randomly decide whether the branch will be taken or not
  2. Do what was done the last time
  3. Give hints to the assembler so it can decide whether the branch is likely to be taken or not.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Refined branch prediction?

A

4 states are maintained from 0 to 3

Every time a branch is taken, the states are incremented.

Every time a branch is not taken, the state is decremented

If the state is 2 or 3 then the assembler will predict that the branch will be taken and it will predict not taken when the states are 0 or 1.

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

What is a scalar processor?

A

A scalar processor is a processor that can execute only one instruction per cycle.

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

What is a superscalar processor?

A

A processor has different execution units such as adder, multiplier, fpu, load/store etc.

Every instruction uses only one of these units.

So 2 instructions which do not use the same units can be executed simultaneously by the processor. Such processors are called superscalar processors.

A processor that can execute more than one instruction at at time.

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

How does a compiler help with a super scalar processor?

A

The compiler can helps superscalar processors by placing instructions that require different execution units in the processors one after the other. So for eg

an integer operation following a floating point operation

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

What is out of order execution and explain how it would be carried out in general.

A

When trying to execute 2 instructions in simultaneuously and there happens to be an unsolvable hazard ( be it structural or data ), then the processor can pick another instruction to execute and this is known as out of order execution as the instructions are not executed in the order they are found in.

The general idea behind this is:

  1. Instruction are fetched few at a time.
  2. Once they are decoded, they are sent back to a queue, one for each execution unit.
  3. Once they are executed, the MEM and the WB stages need to be done in the right order.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is hyper threading?

A

The instructions from 2 threads don’t have a lot of dependencies and one processor can handle 2 different threads or processes and this is called hyperthreading. It’s like having 2 virtual cores

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