Hardware Secrets


Home | Camera | Case | CE | Cooling | CPU | Input | Memory | Mobile | Motherboard | Networking | Power | Storage | Video | Other
Content
Articles
Editorial
First Look
Gabriel’s Blog
News
Reviews
Tutorials
Main Menu
About Us
Awarded Products
Compare Prices
Datasheets
Dictionary
Download
Drivers
Facebook
Forums
Links
Manufacturer Finder
Newsletter
On The Web
RSS Feed
Test Your Skills
Twitter
Newsletter
Subscribe today!
Search




Recommended
The Winn L. Rosch Hardware Bible, 6th Edition
The Winn L. Rosch Hardware Bible, 6th Edition, by Winn L Rosch (Que), starting at $0.48
Home » CPU
How a CPU Works
Author: Gabriel Torres
Type: Tutorials Last Updated: September 26, 2005
Page: 9 of 9
Real-time pricing for Zalman CNPS10XEXTREME.
Copper/aluminum Cpu Cooler Zalman CNPS10XEXTREME 35554 Electronics Usually ships in 24 hours
Amazon: $62.78 Newegg: $79.99
TigerDirect: $74.99 CompUSA: $74.99

Speculative Execution

Let’s suppose that one of this generic instructions is a conditional branching. What will the out-of-order engine do? If the CPU implements a feature called speculative execution (all modern CPUs do), it will execute both branches. Consider the example below:

1. generic instruction
2. generic instruction
3. if a=<b go to instruction 15
4. generic instruction
5. generic instruction
6. generic instruction
7. math instruction
8. generic instruction
9. generic instruction
10. math instruction

15. math instruction
16. generic instruction

When the out-of-order engine analyses this program, it will pull instruction 15 into one of the FPUs, since it will need one math to fill one of the FPUs that otherwise would be idle. So at a given moment we could have both branches being processed at the same time. If when the CPU finishes processing the third instruction a is greater than b, the CPU will simple discard the processing of instruction 15. You may think this is a waste of time, but in fact it is not. It doesn’t cost anything to the CPU to execute that particular instruction, because the FPU would be otherwise idle anyway. On the other hand, if a=<b the CPU will have a performance boost, since when instruction 3 asks for instruction 15 it will be already processed, going straight to instruction 16 or even further, if instruction 16 also has already been processed by the out-of-order engine.

Of course everything we explained on this tutorial is an over simplification in order to make this very technical subject easier to understand. Read our Inside Pentium 4 Architecture tutorial in order to study the architecture of Pentium 4 processor. We will be also posting an Athlon 64 architecture tutorial very soon.

« Previous |  Page 9 of 9
Print Version | Send to Friend | Bookmark Article | Comments (20)

Related Content
  • Sempron vs. Athlon XP
  • Maximum CPU Temperature
  • How to Upgrade Your CPU
  • Core i7-980X CPU Review
  • Phenom II X6 1090T CPU Review

  • Recommended Deal.
    Zalman CNPS10XEXTREMEZalman CNPS10XEXTREME

    Copper/aluminum Cpu Cooler Zalman CNPS10XEXTREME 35554 Electronics Usually ships in 24 hours

    Amazon: $62.78 Newegg: $79.99
    TigerDirect: $74.99 CompUSA: $74.99

    RSSLatest News
    Antec Announces the One PC Case
    February 9, 2012 - 8:06 AM PST
    Cooler Master Releases Elite 361 PC Case
    February 8, 2012 - 7:50 AM PST
    Microsoft Launches Kinect for Windows
    February 2, 2012 - 8:42 AM PST
    Transcend Announces SSD720 SSD Series
    February 1, 2012 - 7:55 AM PST
    .:: More News ::.


    © 2004-12, Hardware Secrets, LLC. All rights reserved.
    Advertising | Legal Information | Privacy Policy
    All times are Pacific Standard Time (PST, GMT -08:00)