Hardware Secrets
Home | Camera | Case | CE | Cooling | CPU | Input | Memory | Mobile | Motherboard | Networking | Power | Storage | Video | Other
Content
Articles
First Look
Gabriel's Blog
News
Reviews
Tutorials
Main Menu
About Us
Awarded Products
Compare Prices
Datasheets
Dictionary
Download
Drivers
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 (2 Vol. Set)
The Winn L. Rosch Hardware Bible, 6th Edition (2 Vol. Set), by Winn L Rosch (Que), starting at $3.26
Home » CPU
How a CPU Works
Author: Gabriel Torres
Type: Tutorials Last Updated: September 26, 2005
Page: 6 of 9
Real-time pricing for AMD ADX245OCGQBOX.
AMD Athlon II X2 245 Dual Core Processor - 2.90GHz Socket AM3 2MB Cache 2000MHz 4000 MT/s Retail ADX245OCGQBOX
CircuitCity: $64.99 Amazon: $63.78
TigerDirect: $64.99 ZipZoomFly: $59.99

Branching

As we mentioned several times, one of the main problems for the CPU is having too many cache misses, because the fetch unit must access directly the slow RAM memory, thus slowing down the system.

Usually the use of the memory cache avoids this a lot, but there is one typical situation where the cache controller will miss: branches. If in the middle of the program there is an instruction called JMP (“jump” or “go to”) sending the program to a completely different memory position, this new position won’t be loaded in the L2 memory cache, making the fetch unit to go get that position directly in the RAM memory. In order to solve this issue, the cache controller of modern CPUs analyze the memory block it loaded and whenever it finds a JMP instruction in there it will load the memory block for that position in the L2 memory cache before the CPU reaches that JMP instruction.

Unconditional Branching
click to enlarge
Figure 8: Unconditional branching situation.

This is pretty easy to implement, the problem is when the program has a conditional branching, i.e. the address the program should go to depends on a condition not yet known. For example, if a =< b go to address 1, or if a > b go to address 2. We illustrate this example on Figure 9. This would make a cache miss, because the values of a and b are unknown and the cache controller would be looking only for JMP-like instructions. The solution: the cache controller loads both conditions into the memory cache. Later, when the CPU processes the branching instruction, it will simply discard the one that wasn’t chosen. It is better to load the memory cache with unnecessary data than directly accessing the RAM memory.

Conditional Branching
click to enlarge
Figure 9: Conditional branching situation.

Pages (9): « 1 2 3 4 5 [6] 7 8 9 »
Print Version | Send to Friend | | Bookmark Article | Comments (8)

Related Content
  • Athlon 64 Overclocking
  • Pentium 4 Thermal Throttle
  • Maximum CPU Temperature
  • Sempron vs. Celeron D
  • How to Upgrade Your CPU

  • Recommended Deal.
    Thermaltake CL-P0466Thermaltake CL-P0466

    Thermaltake SpinQ CPU Cooler - Socket 775 939 754 AM2/AM2 /1366/1156 Support CL-P0466

    CircuitCity: $64.99 Amazon: $52.99
    eCost: $61.99 Wal-Mart: $64.98

    RSSLatest News
    Sparkle Announces 2 GB GeForce GT 220 Video Card
    March 19, 2010 - 10:17 AM PST
    PowerColor Launches HD 5770 Eyefinity 5 Video Card
    March 19, 2010 - 9:59 AM PST
    In Win Intros IRONCLAD Mid-Tower Case
    March 19, 2010 - 9:39 AM PST
    A-Data Intros 8 GB DDR3 Memory Kit
    March 17, 2010 - 3:40 PM PST
    Intel Launches Xeon 5600 Series and Core i7-980X Processor
    March 16, 2010 - 3:46 PM PST
    Intel Launches 40 GB X25-V SSD Drive
    March 15, 2010 - 1:43 PM PST
    Arctic Cooling Intros Cooler for Radeon HD 5970 and HD 5870
    March 12, 2010 - 12:19 PM PST
    OCZ Announces 32 GB Onyx SSD Unit
    March 10, 2010 - 4:08 PM PST
    MSI Launches X-Slim X360 Laptop
    March 9, 2010 - 4:15 PM PST
    Spire Launches TherMax Eclipse II CPU Cooler
    March 8, 2010 - 2:59 PM PST
    .:: More News ::.

    RSSLatest Content
    All Mobile Celeron Models
    Epson WorkForce 610 All-in-One Printer Review
    All Core i5 Models
    Mionix Naos 5000 Mouse Review
    Arctic Cooling E361-WM Earphones Review
    Don’t Let Your IT Projects Become Vaporware
    OCZ Z Series 850 W Power Supply Review
    HIS Radeon HD 5570 Fan Video Card Review
    Core i7-980X CPU Review
    Gelid Tranquillo CPU Cooler Review
    How to Discover Your Power Supply Real Manufacturer
    OCZ Z Series 1000 W Power Supply Review
    Amacrox Free Earth 85PLUS 650 W Power Supply Review
    ECS A890GXM-A Motherboard
    ASUS M4A89GTD PRO/USB3 Motherboard Review

    Our Most Popular Articles
    Maximum CPU Temperature
    1,155,746 views
    How to Find Out Your Motherboard Manufacturer and Model
    818,675 views
    nVidia Chips Comparison Table
    743,652 views
    Connecting Two PCs Using a USB-USB Cable
    673,118 views
    How To Correctly Apply Thermal Grease
    625,956 views
    AMD ATI Chips Comparison Table
    610,367 views
    ATI Radeon X1300 Pro Review
    506,827 views
    ATI Radeon X1600 XT Review
    494,498 views
    How To Perform a BIOS Upgrade
    443,875 views
    Understanding RAM Timings
    381,954 views

    Latest Threads in Our Forums
    Custom PC Help
    by thebigman101
    All Mobile Celeron Models
    by Hardware Secrets Team
    Sparkle Announces 2 GB GeForce GT 220 Video Card
    by Hardware Secrets Team
    PowerColor Launches HD 5770 Eyefinity 5 Video Card
    by Hardware Secrets Team
    In Win Intros IRONCLAD Mid-Tower Case
    by Hardware Secrets Team
    Corsair CX400W Power Supply Review
    by Olle P
    Epson WorkForce 610 All-in-One Printer Review
    by Hardware Secrets Team
    A-Data Intros 8 GB DDR3 Memory Kit
    by Hardware Secrets Team
    Epson WorkForce 610 All-in-One Printer
    by Hardware Secrets Team
    Mionix Naos 5000 Mouse Review
    by Mescalamba
    .:: Visit Our Forums ::.


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