Docsity

Control Flow Prediction - Computer Systems Architecture - Lecture Slides, Slides of Computer Architecture and Organization

Partial preview of the text

Download Control Flow Prediction - Computer Systems Architecture - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

Understanding and Improving Operating System

Effects

in Control Flow Prediction

Outline

  • Introduction
  • Context Switch Profile and Branch Distribution
  • OS Branch Execution Profile
  • Characteristics Of OS Branches
  • Alleviating Impact Of User/OS Interference
  • Performance Evaluation
  • Summary & Conclusion

Introduction

• We need to evaluate:

  • how well is the hardware suited for a given application
  • how well is it accommodating the operating system (OS)
  • how well is the application exploiting an OS's capabilities
  • Contribution is high:
  • applications are multi-threaded and exercise the I/O subsytem much more extensively

Introduction

  • A detailed characterization of the interactions between the application-OS-hardware can have considerable ramifications in the design of each system component.
  • The intention is;
    • not to propose a new predictor
    • to understand the fundamental nature of the user/OS interference and suggest simple and cost-effective optimizations

Introduction

  • Poor performance caused by;
    • interference between the branches in the user and kernel modes
  • Solution;
    • seperate predictor for each mode.

Context Switch Profile and Branch Distribution

  • OS is activated by;
    • a system call
    • a call by some other application
    • some underlying periodic/asynchronous

mechanism

Context Switch Profile and Branch

Distribution

OS Branch Execution Profile

Characteristics Of OS Branches

  • Branches often have biased behavior, many branches either usually taken or usually not taken.
  • Branch history table (BHT) counters this behavior to predict future outcomes.
  • When branches showing different biases are mapped into the same entry, aliases branches update BHT counters with different directions, leading to aliases mispredictions.

Characteristics Of OS Branches

Alleviating Impact Of User/OS Interference

  • During the initial period of a context switch, both user and kernel history patterns coexist in history capturing structures.
  • In Gshare and any correlation based predictor, this can happen in shift registers (BHSRs) that capture correlation between branches and/or branch history tables (BHTs).

Alleviating Impact Of User/OS Interference

Performance Evaluation

  • split BHSR predictor outperforms split predictor
  • the performance gain due to the elimination of user/OS aliasing by split predictor outweighs the performance loss due to individually using smaller prediction tables for each part.

Summary

  • Control flow prediction is one of the key issues in the design of high performance processors.
  • The operating system affects control flow predictability by introducing the additional user/OS branch aliasing in predictor hardware.
  • OS branches are usually invoked by the exception-driven and intermittently executed kernel routines
  • When interacted with user branches, the OS branches increase misprediction significantly