GATE (Graduate Aptitude Test in Engineering) Computer Science & IT (CS) Computer Organization and Architecture-Instruction Pipelining, Cache and Main Memory Study Material (Page 1 of 12)

Choose Programs:

🎓 Study Material (1190 Notes): 2024-2025 Syllabus

Rs. 1000.00 -OR-

3 Year Validity (Multiple Devices)

Topic-wise Notes & SampleDetails

🎯 302 Numeric, 2894 MCQs (& PYQs) with Full Explanations (2024-2025 Exam)

Rs. 650.00 -OR-

3 Year Validity (Multiple Devices)

CoverageDetailsSample Explanation

Help me Choose & Register (Watch Video) Already Subscribed?

Pipeline Hazards

Edit
  • The problems that occur in the pipeline are called hazards.
  • Hazards that arise in the pipeline prevent the next instruction from executing during its designated clock cycle.

Types of Hazards

Types of Hazards

Structural Hazards

  • Hardware cannot support certain combinations of instructions (two instructions in the pipeline require the same resource) .
  • Structural hazards arise because there is not enough duplication of resources.

Structural hazards are resolved by following method:

Solution 1: Wait

  • Must detect the hazard
  • Must have mechanism to stall
  • Low cost and simple
  • Increases CPI
  • Used for rare cases

Solution 2: Throw More Hardware at the Problem

  • Pipeline hardware resource
  • Use…

… (1042 more words, 75 figures) …

Subscribe (by clicking here) to view full notes and track progress.

Control Hazards

Edit

Control Hazards

  • A branch in a sequence of instructions causes a problem.
  • If the branch is not resolved, we will not know where to fetch the next instruction from and this causes a problem.
  • This delay in determining the proper instruction to fetch is called a control hazard or branch hazard.
  • The two major issues related to control dependences are exception behavior and handling and preservation of data flow.
  • Preserving exception behavior requires that any changes in instruction execution order must not change how exceptions are raised in program. It means no new exceptions should be generated.

Example:

Control Hazards
ADDR2, R3, R4
BEQZR2, L1
LDR1,0 (R2)
L1:
  • Moving LD before BEQZ may lead to memory protection violation.
  • The branch ins…

… (378 more words, 16 figures) …

Subscribe (by clicking here) to view full notes and track progress.