Under the Hood: Processor Insides

Buffers/Cache Memory

Your system memory is a key component in storing data as processing goes on. But, it is WAY too slow to keep up with the internal calculations being done by your processor. So, a processor contains its own internal cache and multiple buffers to aid it in storing data. Buffers are simply temporary storage areas for instructions that either are incomplete or have not been written to memory. Buffers are used throughout the processor in a variety of purposes and settings. Since the actual calculation units do only one thing at a time, despite the speed at which they do it, a memory buffer is needed to store queued instructions, processed instuctions, etc.

In addition to the various memory buffers built-in to the processor circuitry, there is cache on the processor to serve as temporary storage areas. Cache is broken up into two categories: the Level One cache runs at the processor’s own clock speed, so is very fast. This cache is split up into two sections, one for data, the other for instructions. The more level one cache you have, the faster the chip. Computers usually come with secondary, or Level Two, cache. This cache used to reside on the motherboard itself and was thus confined to the speed of the system bus. To get around this limitation, the Pentium Pro and Pentium II and later processors have their own built in level two cache. The Pentium II and later chips house the level two cache along with the CPU, therefore bypassing the motherboard altogether. The Pentium II has its L2 cache on the daightercard with the processor, and it ran at half the speed of the processor. But, later chips from both AMD and Intel now have the L2 cache built right into the die of the processor, running at full clock speed.

A Bit on Prediction

As I said above, the actual speed of a processor depends on a lot more than its clock speed. One of the factors that determine overall speed is the ability of a processor to predict instructions, to predict what is coming next. Branch prediction is one such methodology used by processors today, and is almost a necessity with today’s highly pipelined chips. The terms refers to the ability of the processor to predict, based on past instructions, what the coming instruction will be in a set. To illustrate the need for this, take a simple IF, THEN statement in programming.

IF A=B THEN
   DO C
ELSE
   DO D
ENDIF

In a pipeline, where multiple instructions are being set up for processing at a time, a statement like this would be a problem. The processor would decode the IF statement by comparing A and B, but it would not know whether it was going to be doing C or D at this point, so it could not put that instruction into the pipeline for rapid execution. These types of statements are very common in programming, and would cause a problem for pipelining. This problem is handled by giving the processor the ability to predict which way the branch will go, thereby allowing it to put that insturction into the pipeline and not degrade performance. This is called branch prediction. A slightly less advanced processor would simply do what is called speculative execution, which would simply be to do both C and D at the same time and then throw out whichever one it doesn’t need when it knows if A is equal to B. With branch prediction, it will make use of a buffer to store the results of a branch when it is processed. This data is then used later to predict the results of future branches in the programming code.

Pages: 1 2 3

Free eBook!

Like what you read?

If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:

Post A Comment Using Facebook

What’s Your Preference?

Daily Alerts

Each day we send out a quick email to thousands of PCMECH readers to notify them of new posts. This email is just a short, plain email with titles and links to our latest posts. You can unsubscribe from this service at any time.

You can subscribe to it by leaving your email address in the following field and confirming your subscription when you get an email asking you to do so.

Enter your email address for
Daily Updates:

Weekly Newsletter

Running for over 6 years, the PCMECH weekly newsletter helps you keep tabs on the world of tech. Each issue includes news bits, an article, an exclusive rant as well as a download of the week. This newsletter is subscribed to by over 28,000 readers (many who also subscribe to the other option) - come join the community!

To subscribe to this weekly newsletter simply add your email address to the following field and then follow the confirmation prompts. You will be able to unsubscribe at any time.

Enter your email address for
Free Weekly Newsletter: