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




Recommended Book
The Winn L. Rosch Hardware Bible (6th Edition)
By Winn L Rosch
Que
Price: $0.92

Home » CPU
How a CPU Works
Author: Gabriel Torres
Type: Tutorials Last Updated: September 26, 2005
Page: 5 of 9
$ Check REAL-TIME pricing for Intel Core 2 Duo Retail Boxed E7200 Processor - 2.53GHz, 3MB Cache, 1066MHz FSB, 45nm Wolfdale E700 Boxed Processor $
CompuVest: $129.91 PCNation: $138.32
Dell: $159.99 Newegg.com: $119.99
ZipZoomfly.com: $119.00 TigerDirect: $139.99

Memory Cache

Memory cache is a high performance kind of memory, also called static memory. The kind of memory used on the computer main RAM memory is called dynamic memory. Static memory consumes more power, is more expensive and is physically bigger than dynamic memory, but it is a lot faster. It can work at the same clock as the CPU, which dynamic memory is not capable of.

Since going to the “external world” to fetch data makes the CPU to work at a lower clock rate, memory cache technique is used. When the CPU loads a data from a certain memory position, a circuit called memory cache controller (not drawn on Figure 6 in the name of simplicity) loads into the memory cache a whole block of data below the current position that the CPU has just loaded. Since usually programs flow in a sequential way, the next memory position the CPU will request will probably be the position immediately below the memory position that it has just loaded. Since the memory cache controller already loaded a lot of data below the first memory position read by the CPU, the next data will be inside the memory cache, so the CPU doesn’t need to go outside to grab the data: it is already loaded inside in the memory cache embedded in the CPU, which it can access at its internal clock rate.

The cache controller is always observing the memory positions being loaded and loading data from several memory positions after the memory position that has just been read. To give you a real example, if the CPU loaded data stored in the address 1,000, the cache controller will load data from “n” addresses after the address 1,000. This number “n” is called page; if a given processor is working with 4 KB pages (which is a typical value), it will load data from 4,096 addresses below the current memory position being load (address 1,000 in our example). By the way, 1 KB equals to 1,024 bytes, that’s why 4 KB is 4,096 not 4,000. On Figure 7 we illustrate this example.

How memory cache works
click to enlarge
Figure 7: How the memory cache controller works.

The bigger the memory cache, the higher the chances of the data required by the CPU are already there, so the CPU will need to directly access RAM memory less often, thus increasing the system performance (just remember that every time the CPU needs to access the RAM memory directly it needs to lower its clock rate for this operation).

We call a “hit” when the CPU loads a required data from the cache, and we call a “miss” if the required data isn’t there and the CPU needs to access the system RAM memory.

L1 and L2 means “Level 1” and “Level 2”, respectively, and refers to the distance they are from the CPU core (execution unit). One common doubt is why having three separated cache memories (L1 data cache, L1 instruction cache and L2 cache). Pay attention to Figure 6 and you will see that L1 instruction cache works as an “input cache”, while L1 data cache works as an “output cache”. L1 instruction cache – which is usually smaller than L2 cache – is particularly efficient when the program starts to repeat a small part of it (loop), because the required instructions will be closer to the fetch unit.

On the specs page of a CPU the L1 cache can be found with different kinds of representation. Some manufacturers list the two L1 cache separately (some times calling the instruction cache as “I” and the data cache as “D”), some add the amount of the two and writes “separated” – so a “128 KB, separated” would mean 64 KB instruction cache and 64 KB data cache –, and some simply add the two and you have to guess that the amount is total and you should divide by two to get the capacity of each cache. The exception, however, goes to the Pentium 4 and newer Celeron CPUs based on sockets 478 and 775.

Pentium 4 processors (and Celeron processors using sockets 478 and 775) don’t have a L1 instruction cache, instead they have a trace execution cache, which is a cache located between the decode unit and the execution unit. So, the L1 instruction cache is there, but with a different name and a different location. We are mentioning this here because this is a very common mistake, to think that Pentium 4 processors don’t have L1 instruction cache. So when comparing Pentium 4 to other CPUs people would think that its L1 cache is much smaller, because they are only counting the 8 KB L1 data cache. The trace execution cache of Pentium 4 and Celeron CPUs is of 150 KB and should be taken in account, of course.

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

Related Content
  • Pentium 4 Thermal Throttle
  • Dual Core AMD Processors
  • Maximum CPU Temperature
  • Sempron 3000+ and Celeron D 331 Review
  • How to Upgrade Your CPU

  • Recommended Deals
    AMD Athlon 64 3500+, 2.2 GHz (ada3500dik4b) OEM / Unboxed Processor


    CompuVest: $42.99 ZipZoomfly.com: $59.99
    Jlpnetworksstore: $801.14 Hpshopping: $441.99
    AMD Athlon™ XP 2800+, 2.8 GHz (AXDA2800BOX) Retail Processor


    ZipZoomfly.com: $106.99 Provantage: $919.83
    Amazon: $998.57 Circuitcity: $549.99
    PcSuperDeals: $942.50 Compusa: $599.99
    AMD Athlon™ 64 3800 3800+, 2 GHz AMD Processor in a Box (PIB)


    Server Supply: $135.00 Amazon: $103.39
    Hpshopping: $441.99 Jlpnetworksstore: $801.14
    AMD Athlon™ 64 3000+, 2.0 GHz (ada3000box) AMD Processor in a Box (PIB)


    ZipZoomfly.com: $105.00 Jlpnetworksstore: $801.14
    Hpshopping: $441.99
    Intel Core™2 Quad Q6600, 2.40 GHz (BX80562Q6600) Boxed Processor


    TigerDirect.com: $189.99 Dell: $329.99
    Circuit City: $279.99 CompUSA.com: $189.99
    ZipZoomfly.com: $188.50

    RSSLatest News
    Patriot Launches SO-DIMM DDR3-2000
    September 5, 2008 - 7:28 AM PST
    Kingston Unveils HyperX SO-DIMM Memory Kit
    September 4, 2008 - 10:59 AM PST
    Thermaltake Launches V9 Case Series
    September 3, 2008 - 7:54 AM PST
    Sigma Launches 1,000 W Power Supply
    September 2, 2008 - 7:55 AM PST
    Intel Launches New Processors
    September 1, 2008 - 11:16 AM PST
    Scythe Launches Kaze Maru Case Fan
    September 1, 2008 - 10:24 AM PST
    Lian Li Launches Silent Force Power Supply Series
    August 29, 2008 - 9:24 AM PST
    New Thermaltake Power Supplies
    August 28, 2008 - 11:43 AM PST
    Sparkle and MSI Launch GeForce 9400 GT
    August 28, 2008 - 11:13 AM PST
    NZXT Unveils Whisper Full Tower Case
    August 28, 2008 - 10:39 AM PST
    .:: More News ::.

    RSSLatest Content
    Everything You Need to Know About the CPU C-States Power Saving Modes
    AMD ATI Chips Comparison Table
    nVidia Chips Comparison Table
    Inside Intel Nehalem Microarchitecture
    OCZ Elixir Gaming Keyboard Review
    Everything You Need to Know About The QuickPath Interconnect (QPI)
    Me and Woz
    Introduction to Wireless USB (WUSB)
    Nikon Coolpix S600 Camera Review
    IDF Fall 2008: Opening Keynote
    Thecus N5200 NAS Review
    ECS GeForce 9800 GTX+ Hydra Video Card Review
    320 GB Hard Disk Drive Round-Up
    Razer Destructor Mouse Pad Review
    Sapphire HD 4870 X2 Video Card Review

    Our Most Popular Articles
    Maximum CPU Temperature
    772,857 views
    nVidia Chips Comparison Table
    480,789 views
    AMD ATI Chips Comparison Table
    425,960 views
    ATI Radeon X1300 Pro Review
    414,033 views
    ATI Radeon X1600 XT Review
    408,768 views
    How to Find Out Your Motherboard Manufacturer and Model
    385,763 views
    Connecting Two PCs Using a USB-USB Cable
    348,195 views
    How To Correctly Apply Thermal Grease
    333,428 views
    Sempron vs. Athlon XP
    280,229 views
    Sempron 3400+ Review
    270,451 views

    Latest Threads in Our Forums
    overclocking e8400 problem
    by andybarrel
    Recommendations: Photo Workstation
    by ikesysmi
    Dynex PS400W2
    by tomahawk 1705
    no beeps,no hdd,no video
    by jstarheel
    What configuration is better??
    by Cheetos
    Review - Logitech X530 (5.1)
    by Cheetos
    Flip Ultra Camcorder
    by Hardware Secrets Team
    2.1 PC speakers in car
    by rajani1983
    How to conect spdif on my nvidia 9600 gt with x-fi extreme gamer spdif
    by yapyap
    Slipstreaming SP3
    by BedCommando
    .:: Visit Our Forums ::.

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