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
  • remote infrastructure management

    Remote infrastructure management, or RIM, is a comprehensive approach to handling and overseeing an organization's IT ...

  • port address translation (PAT)

    Port address translation (PAT) is a type of network address translation (NAT) that maps a network's private internal IPv4 ...

  • network fabric

    'Network fabric' is a general term used to describe underlying data network infrastructure as a whole.

Security
CIO
  • digital innovation

    Digital innovation is the adoption of modern digital technologies by a business.

  • business goals

    A business goal is an endpoint, accomplishment or target an organization wants to achieve in the short term or long term.

  • vertical SaaS (software as a service)

    Vertical SaaS describes a type of software as a service solution created for a specific industry, such as retail, financial ...

HRSoftware
  • employee onboarding and offboarding

    Employee onboarding involves all the steps needed to get a new employee successfully deployed and productive, while offboarding ...

  • skill-based learning

    Skill-based learning develops students through hands-on practice and real-world application.

  • gamification

    Gamification is a strategy that integrates entertaining and immersive gaming elements into nongame contexts to enhance engagement...

Customer Experience
  • Microsoft Dynamics 365

    Dynamics 365 is a cloud-based portfolio of business applications from Microsoft that are designed to help organizations improve ...

  • Salesforce Commerce Cloud

    Salesforce Commerce Cloud is a cloud-based suite of products that enable e-commerce businesses to set up e-commerce sites, drive ...

  • Salesforce DX

    Salesforce DX, or SFDX, is a set of software development tools that lets developers build, test and ship many kinds of ...

Close