Zim Brightwood
Test por , creado hace más de 1 año

Unit 2 of UBC's CS313 course. Get some alcohol.

48
0
0
Zim Brightwood
Creado por Zim Brightwood hace más de 7 años
Cerrar

[Final Study] Unit 2 Pipelined CPU

Pregunta 1 de 49

1

Throughput is

Selecciona una de las siguientes respuestas posibles:

  • the rate at which instructions leave the pipeline

  • total time it takes an instruction to be processed by a stage

  • the rate at which instructions move to the next register

  • total time it takes an instruction to be processed by the entire pipeline

Explicación

Pregunta 2 de 49

1

Latency is

Selecciona una de las siguientes respuestas posibles:

  • total time it takes an instruction to be processed by the entire pipeline

  • the rate at which instructions leave the pipeline

  • the rate at which instructions move to the next register

  • total time it takes an instruction to be processed by a stage

Explicación

Pregunta 3 de 49

1

Pretend the pipeline is a cafeteria line in prison. Who is throughput and who is latency?

Selecciona una de las siguientes respuestas posibles:

  • Throughput is the security guard concerned with how often people are leaving the line so nobody shanks anybody. Latency is BUBBA watching Skinny Pete make his way through the line so he can shank him after he gets his food.

  • Throughput is the warden watching the prisoners out in the field and latency is the secretary having an affair with the gardener *gasp*~

  • Throughput is the rate at which the soap leaves a prisoners hand in the showers and latency is the total time it takes to pick it up

Explicación

Pregunta 4 de 49

1

Pipeline registers are placed , those registers store , each stage executes working on a different instruction

Arrastra y suelta para completar el texto.

    between each stage
    after each stage
    before each stage
    inputs for that stage
    outputs for that stage
    inputs for the next stage
    in parallel
    sequentially

Explicación

Pregunta 5 de 49

1

And instruction is when it is currently being executed by the pipeline. Once the instruction completes the pipeline, it is .

Arrastra y suelta para completar el texto.

    in flight
    executing
    latent
    active
    retired
    finished
    complete
    ready

Explicación

Pregunta 6 de 49

1

The pipeline instructions are executed in order

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 7 de 49

1

Instruction-level parallelism exists between a pair of instructions if

Selecciona una de las siguientes respuestas posibles:

  • their execution order does not matter

  • their execution order matters

Explicación

Pregunta 8 de 49

1

The pipeline requires some parallelism

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 9 de 49

1

Dependencies exist if execution order doesn't matter

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 10 de 49

1

Consider the variables a and b. A causal dependency is defined as A<B (Instruction A immediately precedes B) if

Selecciona una de las siguientes respuestas posibles:

  • B reads value written by A
    Example:
    a = 1;
    b = a;

  • B write to visible location written by A
    Example:
    a = 1;
    a = 2;

  • B write to a location read by A
    Example:
    b = a;
    a = 1;

Explicación

Pregunta 11 de 49

1

Consider the variables a and b. An output dependency is defined as A<B (Instruction A immediately precedes B) if

Selecciona una de las siguientes respuestas posibles:

  • B write to visible location written by A
    Example:
    a = 1;
    a = 2;

  • B reads value written by A
    Example:
    a = 1;
    b = a;

  • B write to a location read by A
    Example:
    b = a;
    a = 1;

Explicación

Pregunta 12 de 49

1

Consider the variables a and b. An anti dependency is defined as A<B (Instruction A immediately precedes B) if

Selecciona una de las siguientes respuestas posibles:

  • B write to a location read by A
    Example:
    b = a;
    a = 1;

  • B reads value written by A
    Example:
    a = 1;
    b = a;

  • B write to visible location written by A
    Example:
    a = 1;
    a = 2;

Explicación

Pregunta 13 de 49

1

parallelism is how the programmer tells the system that two pieces of code can execute in parallel. parallelism is the system actually executing two pieces of code in parallel.

Arrastra y suelta para completar el texto.

    Expressing
    Adding
    Mechanizing
    Conflating
    Eating
    Exploiting
    Removing
    Smelling
    Tangential Execution

Explicación

Pregunta 14 de 49

1

A pipeline hazard exists when

Selecciona una de las siguientes respuestas posibles:

  • the processor's execution would violate a data or control dependency

  • the processor's execution would support a data or control dependency

  • the processor's execution would cause a data or control dependency

  • the processor's execution would execute a data or control dependency

Explicación

Pregunta 15 de 49

1

We should detect pipeline hazards

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 16 de 49

1

Stalling is one way to handle pipeline hazards

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 17 de 49

1

A is holding an instruction for an extra cycle.
A is when a pipeline stage is forced to do nothing.

Arrastra y suelta para completar el texto.

    pipeline stall
    pipeline bubble
    pipeline hazard
    pipeline stage
    pipeline overhead

Explicación

Pregunta 18 de 49

1

The only data hazards in the Y86 Pipeline are causal hazards on register file

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 19 de 49

1

The only control hazards in the Y86 Pipeline are conditional jumps

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 20 de 49

1

To prevent a data hazard by stalling, we can

Selecciona una de las siguientes respuestas posibles:

  • read registers in decode that are written by instructions in E, M, or W and then stall the instruction in decode until writer is retired

  • read registers in fetch that are written by instructions in E, M, or W and then stall the instruction in fetch until writer is retired

  • read registers in execute that are written by instructions in E, M, or W and then stall the instruction in execute until writer is retired

Explicación

Pregunta 21 de 49

1

How would we resolve a conditional jump control hazard by stalling?

Selecciona una de las siguientes respuestas posibles:

  • stall fetch until jump exits execute

  • stall execute until jump exits decode

  • stall fetch and execute until jump exits decode

  • stall fetch, decode, and execute until jump exits memory

  • stall fetch, decode, execute, and memory until jump exits write back

  • just stall everything after fetch indefinitely and go finish off a bottle of wine in one go

Explicación

Pregunta 22 de 49

1

How would we resolve a return control hazard by stalling?

Selecciona una de las siguientes respuestas posibles:

  • stall fetch until return exits memory

  • stall decode until return exits memory

  • stall fetch and decode until return exits memory

  • stall fetch, decode, and execute until return exits memory

  • stall fetch, decode, execute, and memory until return exits memory

  • return to cpsc313 in the summer after you fail this midterm

Explicación

Pregunta 23 de 49

1

Check all the statements that are true about the pipeline-control module

Selecciona una o más de las siguientes respuestas posibles:

  • it's a hardware component separate from the 5 stages

  • examines values across every stage

  • decides whether stage should stall or bubble

Explicación

Pregunta 24 de 49

1

Data forwarding is a mechanism that forwards values from later pipeline stages to earlier ones

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 25 de 49

1

Where does data forwarding forward its data to?

Selecciona una o más de las siguientes respuestas posibles:

  • D

  • W

  • M

  • E

  • F

Explicación

Pregunta 26 de 49

1

Where does data forward forward its data from?

Selecciona una o más de las siguientes respuestas posibles:

  • W - new value from memory or ALU

  • M - new value read from memory or from ALU

  • E - new value from ALU

  • D - new value from registers

  • F - new value from PC determined instruction

Explicación

Pregunta 27 de 49

1

Which of these are data hazards?

Selecciona una o más de las siguientes respuestas posibles:

  • register-register hazard

  • load-use hazard

  • register-memory hazard

  • memory-memory hazard

  • use-use hazard

  • load-load hazard

Explicación

Pregunta 28 de 49

1

Which of these is a register-register hazard?

Selecciona una de las siguientes respuestas posibles:

  • irmovl $1, %eax
    addl %eax, %ebx

  • irmovl $1, %ecx
    addl %eax, %ebx

Explicación

Pregunta 29 de 49

1

How do we handle a register-register hazard with data forwarding?

Selecciona una de las siguientes respuestas posibles:

  • forward to D from E, M, or W

  • forward to F from E, M, or W

  • stall one cycle, then forward to D from E, M, or W

  • stall one cycle, then forward to F from D, E, M, or W

  • stall one cycle, then forward to F from E, M, or W

  • forward to F from D, E, M, or W

Explicación

Pregunta 30 de 49

1

Which of these is a load-use hazard?

Selecciona una de las siguientes respuestas posibles:

  • mrmovl (esi), %eax
    addl %eax, %ebx

  • rmmovl %eax, (esi)
    addl %eax, %ebx

Explicación

Pregunta 31 de 49

1

How would we handle a load-use hazard?

Selecciona una de las siguientes respuestas posibles:

  • Stall use one cycle, forward to D from M or W

  • Stall use one cycle, forward to D from E or M

  • Stall use one cycle, forward to E from D, M, or W

  • Stall use one cycle, forward to E from M or W

Explicación

Pregunta 32 de 49

1

Jump prediction is not suitable for resolving conditional-jump hazards

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 33 de 49

1

We know whether the jump is taken or not taken once the jump finishes in stage .

Arrastra y suelta para completar el texto.

    E
    D
    M
    W

Explicación

Pregunta 34 de 49

1

valC is the address for the jump as if it were and valP is the address for the jump as if it were .

Arrastra y suelta para completar el texto.

    not taken
    taken

Explicación

Pregunta 35 de 49

1

When a mis-predicted jump is in M, what should we do?

Selecciona una de las siguientes respuestas posibles:

  • shootdown D and E to prevent them from doing damage

  • shootdown F and D to prevent them from doing damage

  • shootdown M and W to prevent them from doing damage

Explicación

Pregunta 36 de 49

1

The homework in this course is much too long

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 37 de 49

1

We could avoid stalling in a load-use hazard by forwarding m.valM to the beginning of E

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 38 de 49

1

We could have one fewer bubble in a misprediction if we compute when conditional jump is in M, reading m.bch (the branch condition)

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 39 de 49

1

In regards to static jump prediction, what could the compiler know?

Selecciona una o más de las siguientes respuestas posibles:

  • a jump's taken tendency

  • for loops, it can decide to use a continue condition or exit condition

  • for if statements it might be able to spot error tests

  • what it sees in the program text

Explicación

Pregunta 40 de 49

1

The compiler cares about the ISA's jump predictions

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 41 de 49

1

How do we optimize handling the return hazard?

Selecciona una de las siguientes respuestas posibles:

  • Keep a stack of return addresses for future use

  • Guess the return address based on the value in predPC

  • Guess the return address based on the value in PC

  • Guess the return address based on the valP in D

Explicación

Pregunta 42 de 49

1

Y86 has indirect jumps

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 43 de 49

1

Indirect jumps are needed for polymorphic dispatch

Selecciona uno de los siguientes:

  • VERDADERO
  • FALSO

Explicación

Pregunta 44 de 49

1

CPI =

Selecciona una de las siguientes respuestas posibles:

  • totalCycles / instructionRetiredCycles

  • instructionRetiredCycles / totalCycles

Explicación

Pregunta 45 de 49

1

What are the tendencies of deeper pipelines?

Selecciona una o más de las siguientes respuestas posibles:

  • reduce clock period

  • increase CPI

  • makes stalling harder to avoid

Explicación

Pregunta 46 de 49

1

Which of these are attributes of super-scalar?

Selecciona una o más de las siguientes respuestas posibles:

  • multiple pipelines that run in parallel

  • issue multiple instructions on each cycle

  • instructions execute in parallel and can even bypass each other

  • if I shut my eyes tight enough, will the midterm disappear?

Explicación

Pregunta 47 de 49

1

What does hyper-threading consist of? (Only one of the following is correct)

Selecciona una o más de las siguientes respuestas posibles:

  • OS loads multiple runnable threads into CPU, usually from the same process

  • CPU does fast switching between threads to hide memory latency

Explicación

Pregunta 48 de 49

1

What is multi-core?

Selecciona una o más de las siguientes respuestas posibles:

  • multiple CPUs per chip, each pipelined, super-scalar, etc

  • CPU's execute independent threads from possibly different processes

Explicación

Pregunta 49 de 49

1

How could Mike do this to us?

Selecciona una de las siguientes respuestas posibles:

  • Sadism

  • Also sadism

  • And sadism

  • All of the above

Explicación