Pipelining

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/64

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:46 PM on 5/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

65 Terms

1
New cards

What is pipelining in computer architecture?

An implementation technique where multiple instructions are overlapped during execution to improve throughput.

2
New cards

What is the main goal of pipelining?

To increase instruction throughput (instructions completed per unit time).

3
New cards

Does pipelining reduce the execution time of a single instruction?

No. Individual instruction latency remains roughly the same.

4
New cards

What performance metric does pipelining improve?

Program throughput.

5
New cards

What does CPI stand for?

Cycles Per Instruction.

6
New cards

What is the ideal CPI in a pipelined RISC processor?

Ideally, CPI = 1.

7
New cards

What is Instruction-Level Parallelism (ILP)?

The ability to execute parts of multiple instructions simultaneously.

8
New cards

What are the two major requirements for pipelining?

  1. Sufficient hardware resources 2. Independence between instructions
9
New cards

Why can dependencies hurt pipelining?

Because dependent instructions may need results that are not yet available.

10
New cards

What happens if data required by an instruction is not ready?

The pipeline stalls or uses forwarding/bypassing mechanisms.

11
New cards

What is a single-cycle processor?

A processor where each instruction completes in one long clock cycle.

12
New cards

What is a multi-cycle processor?

A processor where instructions are broken into stages executed across multiple cycles.

13
New cards

Why are multi-cycle processors more efficient than single-cycle processors?

They avoid wasted time by dividing instructions into smaller operations.

14
New cards

Name the classic 5 pipeline stages.

  1. IF – Instruction Fetch 2. ID – Instruction Decode 3. EX – Execute 4. MEM – Memory Access 5. WB – Write Back
15
New cards

What happens during the Instruction Fetch (IF) stage?

The processor fetches the instruction from memory.

16
New cards

What happens during the Instruction Decode (ID) stage?

The instruction fields are interpreted and operands are identified.

17
New cards

What happens during the Execute (EX) stage?

ALU operations are performed.

18
New cards

What happens during the Memory (MEM) stage?

Memory is accessed if required.

19
New cards

What happens during the Write Back (WB) stage?

Results are written back to registers and/or memory.

20
New cards

Why can multiple instructions overlap in a pipeline?

Because different hardware units handle different stages simultaneously.

21
New cards

When does the fetch unit become free?

After completing the fetch stage of an instruction.

22
New cards

Why can the next instruction begin fetching while the previous instruction decodes?

Because separate hardware resources are used.

23
New cards

What is pipeline fill time?

The time required before the pipeline starts producing completed instructions every cycle.

24
New cards

What is pipeline drain time?

The time needed to finish remaining instructions after no new instructions enter the pipeline.

25
New cards

After the pipeline is filled, how many instructions ideally complete per cycle?

One instruction per cycle.

26
New cards

Why does RISC use fixed-size instructions?

To simplify decoding and pipeline design.

27
New cards

What is the common instruction size in classic RISC?

32 bits.

28
New cards

Why is fixed instruction size beneficial?

The processor always knows where opcode and operands are located.

29
New cards

What information is stored in an instruction?

Opcode, source operands, destination operand, and function bits.

30
New cards

Why are registers important in RISC?

Most operations are performed directly on registers.

31
New cards

What does the Program Counter (PC) store?

The address of the next instruction.

32
New cards

Why does the PC typically increment by 4 bytes?

Because instructions are 32 bits (4 bytes) long.

33
New cards

What causes the PC to jump to another address?

Branch or jump instructions.

34
New cards

Why do branch instructions create problems in pipelines?

The processor does not immediately know which instruction comes next.

35
New cards

What is a pipeline hazard?

A condition that prevents the next instruction from executing during its designated cycle.

36
New cards

What are the three major types of pipeline hazards?

  1. Structural hazards 2. Data hazards 3. Control hazards
37
New cards

What causes a structural hazard?

Resource conflicts between instructions.

38
New cards

Give an example of a structural hazard.

Two instructions needing the same register or hardware unit simultaneously.

39
New cards

What causes a data hazard?

Dependencies between instructions.

40
New cards

What is a producer instruction?

An instruction that generates a value.

41
New cards

What is a consumer instruction?

An instruction that uses a value produced by another instruction.

42
New cards

Why does a consumer instruction sometimes stall?

Because the producer has not finished generating the needed data.

43
New cards

What could happen if the pipeline ignores a data hazard?

Incorrect computation due to garbage/old values.

44
New cards

Which pipeline stage detects operand dependencies?

Instruction Decode (ID).

45
New cards

What causes a control hazard?

Branch and jump instructions.

46
New cards

Why must the processor wait during a branch?

Because it must determine the correct next instruction address.

47
New cards

Which stage usually identifies a branch instruction?

Instruction Decode stage.

48
New cards

Why can excessive branching reduce performance?

Frequent branch resolution causes pipeline stalls.

49
New cards

What limits pipeline speed?

The slowest pipeline stage.

50
New cards

Why doesn’t deeper pipelining always improve performance?

Hazards and stalls reduce ideal gains.

51
New cards

What is the formula for average instruction execution time?

Execution Time = Clock Cycle Time × CPI

52
New cards

In an ideal pipeline, what determines execution time?

Mainly the clock cycle time.

53
New cards

Why might pipelining increase clock cycle time slightly?

Additional pipeline hardware and synchronization overhead.

54
New cards

If instruction 2 uses a value produced by instruction 1, what dependency exists?

A data dependency.

55
New cards

When is it safe for a dependent instruction to proceed?

When the required value has been produced.

56
New cards

Can an instruction still be fetched before dependency resolution?

Yes, because fetch does not yet require operand values.

57
New cards

Which stage actually requires operand values?

Decode stage.

58
New cards

What is a register physically implemented with?

Latches/flip-flops built from logic gates and transistors.

59
New cards

What is special about pipeline registers?

They are optimized for rapid read/write operations within cycles.

60
New cards

Why are pipeline registers important?

They hold intermediate results between stages.

61
New cards

Does pipelining change program execution order?

No, it preserves sequential correctness.

62
New cards

Why is maintaining execution order important?

To preserve correct program behavior.

63
New cards

What is the safest response to unresolved dependencies?

Stall the pipeline.

64
New cards

What does retired instruction mean?

An instruction that has completed execution successfully.

65
New cards

What is the biggest advantage of RISC for pipelining?

Simple, fixed-format instructions make pipeline stages easier and faster to design.