Browse Definitions :
Definition

speculative execution

Speculative execution is an optimization technique in which a processor (CPU) performs a series of tasks before it is prompted to, in order to have the information ready if it is required at any point. Speculative execution uses concurrent processing and out-of-order execution (OoOE) to anticipate and fetch data that might be required at a latter point. It eliminates the stall experienced while waiting for appropriate instructions to arrive for the next step.  Speculative execution uses branch prediction to guess which instructions will most likely be needed in the near future and data flow analysis to arrange the instructions for optimal execution (instead of executing them in the order they came in). The goal is to reduce the total execution time and improve the overall CPU performance.

First, the branch predictor guesses which branch is most likely to be taken in the process and then gathers the next set of instructions associated with that branch. It will then begin speculatively executing them before it knows which of the two branches it will actually be using. If the branch predictor guessed correctly, then the instructions are already lined up and there will be no execution delay. If the branch predictor guessed incorrectly, then the system loads the appropriate information and proceeds with those instructions instead. However, accuracy rates for branch predictors are typically above 95 percent, so the need to reload new information is uncommon.

With in-order execution, a pipeline stall will stop the entire CPU until the issue is solved. Also, a gap is created between CPU and main memory speeds. As the gap grows, the time spent waiting for the main memory to deliver information to the CPU grows as well, thus increasing the time spent waiting on the execution. Speculative execution closes this gap by keeping the CPU busy and minimizing the time it spends idling, thus improving the overall performance of the system.

Speculative execution was adopted by Intel, who started using OoOE with its microprocessors Pentium Pro and Pentium II, Advanced Micro Devices (AMD), who introduced it with the K5 microprocessor, and Advanced RISC Machines (ARM), who began using it with the Cortex A9 microprocessor.

While speculative execution can improve the performance of a computer system, it is important to note that it may also cause security flaws such as meltdown CPU vulnerability.

This was last updated in June 2019

Continue Reading About speculative execution

Networking
  • What is wavelength?

    Wavelength is the distance between identical points, or adjacent crests, in the adjacent cycles of a waveform signal propagated ...

  • subnet (subnetwork)

    A subnet, or subnetwork, is a segmented piece of a larger network. More specifically, subnets are a logical partition of an IP ...

  • secure access service edge (SASE)

    Secure access service edge (SASE), pronounced sassy, is a cloud architecture model that bundles together network and cloud-native...

Security
CIO
  • What is a startup company?

    A startup company is a newly formed business with particular momentum behind it based on perceived demand for its product or ...

  • What is a CEO (chief executive officer)?

    A chief executive officer (CEO) is the highest-ranking position in an organization and responsible for implementing plans and ...

  • What is labor arbitrage?

    Labor arbitrage is the practice of searching for and then using the lowest-cost workforce to produce products or goods.

HRSoftware
  • organizational network analysis (ONA)

    Organizational network analysis (ONA) is a quantitative method for modeling and analyzing how communications, information, ...

  • HireVue

    HireVue is an enterprise video interviewing technology provider of a platform that lets recruiters and hiring managers screen ...

  • Human Resource Certification Institute (HRCI)

    Human Resource Certification Institute (HRCI) is a U.S.-based credentialing organization offering certifications to HR ...

Customer Experience
Close