The Central Processing Unit (CPU) and the bus in a computer can be compared to the central nervous system in a human, with the CPU acting as the brain and the buses acting as nerves. The clock is like the heart in that it keeps everything working in time. This unit focuses on those components that allow a computer to run our programs and perform much of our work. Because the CPU is such an important part of a computer, we will discuss many issues that surround this device, including how to keep it cool. We will also take a look at memory and memory devices.
If you review the history of the computer from the ancient Chinese abacus to today’s high-speed marvels, you will note that technology progressed in jumps centered on some technological breakthrough. With each new breakthrough, the computer is elevated to new heights. Most of these developments are based upon the progress of the CPU. As always, let’s begin this presentation with the objectives.
When you complete this presentation, you will be able to: Describe the components that make up a CPU. Demonstrate the purpose of a CPU clock. Discuss how the clock determines CPU speed. Explain the purpose of an instruction set.
This slide shows a Pentium 4 CPU (central processing unit) mounted on the motherboard. The CPU and bus in a computer is like the central nervous system of the human body. The CPU acts as the brain, and the buses act as nerves. You can think of the clock as the computer’s heart, because it keeps everything working in time.
The transistor is one of the most-widely-used components. The example shown is a “discrete” transistor, meaning that it is an independent device. Transistors have a special property that allowes them to conduct electricity under certain controlled conditions. The trick is in controlling the conditions, which then allows us to control other devices and circuits. We can connect many transistors together to form larger circuits that can perform some sort of logic operation. All transistors have three leads, usually referred to as the emitter, the collector, and the base. Transistors have many special characteristics that make each type suitable for different tasks.
Resistors are the simplest electrical components. They are used to limit current, or the flow of electricity. As their name implies, they “resist” current flow. The amount of resistance they present is measured in “ohms”. For example, you would say of a resistor: “It’s a 470-ohm resistor.” Whenever resistance is present, power is being used, which generates heat. Most small resistors, as shown, don’t get very warm; these are typically referred to as ¼-watt resistors. Resistors are available in all shapes and sizes, those shown here are typical of regular consumer electronic devices. Some others are very large and have special devices attached to help dissipate heat. Notice the colored stripes on these resistors. The colors are used as a code to determine the value of the resistor.
Here is a chart that depicts the resistor color codes.
The potentiometer, or variable resistor, is a special type of resistor. The resistance value of this device is determined by where the control is turned. You use these all the time, in the form of volume controls, and other adjustment controls on devices such as monitors. Whenever you use a potentiometer, you are working with an analog circuit. Oftentimes, however, the potentiometer is the only analog component in a digital device…. Technicians call these “pots.”
Capacitors are used to store charges and filter signals. The devices shown are typical small “caps.” You will see plenty of these in radios. Notice the small orange capacitor is located next to an integrated circuit. These capacitors are used to filter noise out of the power applied to the IC. Capacitor values are measured in “Farads.” The farad is a very large unit, so nearly all capacitors have a value much less than one farad. For example, the green capacitor labeled 104J has a value of .1 microfarads, or 0.0000001 farads.
Another type of capacitor merits special attention. All capacitors can store a charge, but “electrolytic” capacitors, as shown, can store very large charges. In fact, they can store a charge large enough to hurt you. You must be careful when you work on any device that contains electrolytic capacitors, especially big ones. Consider any capacitor larger than the last part of your little finger as large.
Integrated Circuits are commonly called “ICs”, or just “chips.” They were revolutionary when there were first introduced because they allowed many, many transistors to be built into one small device. The ICs shown here are built into a package referred to as a “dual-inline package,” or DIP for short. DIPs come in many sizes, from a total of four pins all the way up to 68 or even more. DIPs are either soldered directly to a circuit board, or they are plugged into sockets. Soldering them is more reliable in the long run, but makes them much harder to replace. Many BIOS chips are socketed DIPs on the motherboard.
No digital circuits will run without a clock, or some other similar signal. CPUs are no different, and a clock is an essential component of every motherboard ever built. The Clock circuit consists of two parts: a crystal that generates a signal at some known and fixed frequency, and a clock controller that can generate many different frequencies, once the crystal is running. Here’s how it works: Once power is applied to the motherboard, the crystal begins to oscillate at its specified frequency. All the crystal needs is power, and it will run all by itself. However, most motherboards need a clock signal much faster than 14.318 MHz, and that’s where the clock chip comes into play. The clock chip can process the incoming crystal signal into many different frequencies. The BIOS tells the clock chip exactly what bus clock speed is required, and the clock chip dutifully generates the proper signal. For example, the CPU tells the BIOS “I’m a 400 MHz CPU, and I need a bus speed of 100 MHz.” The BIOS accepts that information, and then tells the clock chip to generate a 100 MHz bus signal. In response,the clock chip converts the 14.318 MHz crystal signal into a 100 MHz signal, and then puts that signal out onto the bus. At this point, the rest of the motherboard comes to life, and the computer starts to boot.
Every CPU is controlled by a set of instructions. They tell the CPU where to find data, when to read data, and what to do with the data. Depending upon the CPU and what it is designed to do, the instruction set may be made up of bytes of binary data bits (8), words (16), or double-words (32). A standard is necessary to guarantee a uniform program code that all PCs will recognize, and every programmer (code writer) can implement. An enhanced standard instruction set referred to as Streaming SIMD (Single Instruction Multiple Data) Extensions, provides a way to efficiently process data so that a single instruction can be applied to multiple pieces of data at the same time, rather than to each piece of data individually. Repetitive tasks are effectively reduced into a single task, which greatly increases the speed of data processing. These instructions are used to accelerate multimedia applications, include rendering higher quality images, high quality audio, MPEG2 video, and speech recognition.
Before we leave this presentation, let’s review the objectives. Describe the components that make up a CPU. Demonstrate the purpose of a CPU clock. Discuss how the clock determines CPU speed. Explain the purpose of an instruction set.
Microprocessors have evolved from the first 8088 to today’s high-speed dual-core Pentiums. The four basic elements that have customarily been used to measure the performance of each new chip design are: Speed – The maximum number of clock cycles measured in MHz (megahertz). External Data Bus – The size of the bus determines how much data can go in and out of the CPU. Address Bus – The size of the address bus determines the maximum amount of memory that is addressable by the CPU. Internal Cache – Internal cache is high-speed memory built into the processor. As always, let’s begin this presentation with its objectives.
When you complete this presentation, you will be able to: Describe the main factors used to compare CPU performance. Develop an understanding of earlier processors, and how processors have evolved through the years. Describe how the Pentium family of CPUs evolved. Describe the basic structure of today’s dual-core CPUs.
The first microprocessor dates back to 1971 when a small company named Intel designed a device called the 4004. It was originally designed to be the core logic for the small electronic calculators, which were just becoming affordable at that time. Unlike prior control logic devices, which were designed for a particular purpose, the 4004 was a general-purpose device whose characteristics could be controlled by a small program in ROM. By today’s standards it was extremely primitive, and handled only four bits of data at a time and operated at speeds of about 100 kilohertz. It contained about 2300 transistors on a single chip of silicon and could handle only 640 bytes of memory. Just to emphasize that last item, that was 640 bytes.
A few months later, Intel introduced the first 8-bit microprocessor, the 8008. It was an expanded version of the 4004, which handled 8 bits at a time over an 8-bit bus. It contained nearly twice as many transistors and operated at almost twice the speed of the 4004. But perhaps its greatest advance was its ability to address up to 16K bytes of memory. This allowed much more complex control programs.
In 1974, Intel introduced a microprocessor with enough instructions, enough speed at 2 MHz, and enough memory at 64Kbytes to form the core of a primitive microcomputer. A small calculator company called MITS designed what is normally regarded as the first personal computer, the Altair, which used the 8080 as its core. It was introduced to the world in 1975. Over the next few years, dozens of personal computer designs from other companies followed, most based upon the Intel 8080 microprocessor.
Between 1974 and 1979, many additional microprocessors were introduced by Intel and other companies. But none was more important to the personal computer than the Intel 8088, which was introduced in 1979. Its internal 16-bit registers made it fast and powerful, while its external 8-bit bus made it and its supporting circuitry affordable enough to be used in personal computers. The 8088 is a 40-pin DIP package.
This unique combination of power and affordability prompted IBM to use the 8088 in its first Personal Computer. Introduced in August 1981, the IBM PC brought respectability and standardization to the fledgling personal computer market. Fortunately, IBM used off-the-shelf components in its design, which were available to everyone. Within months IBM-compatible “clones” began to appear. The evolution of the IBM-compatible computer has followed the evolution of the Intel family of microprocessors to this very day. So let’s continue the story of the microprocessor.
The next important step in Intel’s microprocessor history was the 80286 introduced in 1982. The 80286 opened the door to color and graphics. It processed data internally 16-bits at a time and operated over a 16-bit external bus. It could address 16 Megabytes of memory and ran at about 12 MHz. It is notable because the second generation of IBM PC, the IBM AT, used this chip as its processor. The 286 is considered to be the second generation of microprocessor. An 80186 was developed, but it was not used in any significant computers.
The third generation began with the 386 family whose first members were introduced in 1985. This was another quantum leap in capability. Its internal registers were 32-bits wide as was its I/O bus. This allowed it to operate on four bytes at a time. Also, its upper memory limit of 6 Gigabytes seemed unlimited at the time. The 386 was the first processor to be packaged in a PGA package.
The 386sx was a 386 on the inside, but a 286 on the outside. This device allowed Intel to build the latest 32-bit processor into computers that were capable of utilizing 16-bit motherboards. This allowed for major cost reductions, which make the -sx an inexpensive alternative.
To understand the fourth generation microprocessors, we must first talk about Math Coprocessors. The math coprocessor is a special circuit designed to perform floating point arithmetic. Floating point refers to fractional numbers and exponents as opposed to only integer or whole numbers. Initially, the math coprocessor was a separate integrated circuit because its complexity approached that of the microprocessor itself.
For example, the 8088 had a separate coprocessor called the 8087. The 80286 had a sister chip called the 80287. Finally, the 80386 had a separate math coprocessor called the 80387.
However, beginning with the 80486, the math coprocessor became a part of the microprocessor itself. Not every model of the 486 had the coprocessor, but many did. In most other respects, the 486 was just a faster version of the 386, as you can see here. Oh, there was one other important difference. The 486 also had an on-board cache memory.
The internal cache memory is a high-speed memory that is built right inside the microprocessor itself. Because this small memory is able to keep up with the processor, it can significantly increase the overall speed of the system. All processors since the 486 have included an internal or L1 cache.
In 1993, the fifth generation was ushered in by Intel’s Pentium microprocessor. Its I/O bus was twice the width of the 486. The 64-bit system bus allowed 8 bytes to be transferred at a time. It also contained two 8 KB internal caches, one for instructions and one for data. Introduced with a clock rate of 60 MHz, its speed was increased over the years to 200 MHz. The Pentium was also notable because it was the first in the Intel family to execute more than one instruction at a time.
Another way to increase processor speed is to reduce the number of clock cycles required to execute an instruction. This slide compares the number of clock cycles required to execute an average instruction in various versions of Intel processors. Notice that the 8088 required 12 clock cycles, whereas the 286 and 386 required only about four and a half. The 486 cut the number of clock cycles to about two, while the Pentium reduced it to about one. The average can be reduced to one because more than one instruction is processed at any given time.
This is a photo of a Pentium I in its socket. The Pentium I is always covered by a heatsink and a fan.
The sixth generation of microprocessor started with the Pentium Pro in November of 1995. Its greatest claim to fame is that it was the first of the Intel family to include the L2 cache in the same package, although not on the same chip as the microprocessor. The L2 cache is normally an external cache memory that is much larger than the internal or L1 cache. It is much faster than DRAM, although not generally as fast as the internal or L1 cache. Another first for the Pentium Pro: It can handle up to 64 Gigabytes of memory.
The packaging is unique among the Intel family. The microprocessor and L2 cache sit side-by-side in a single package. Because the cache is embedded in the same package with the processor, the cache can run at a higher speed. Also, the cache operates on a different bus than the normal system bus. This is often referred to as dual independent bus architecture.
In January of 1997, the MMX version of the Pentium was introduced. It was basically a very fast Pentium with 57 new instructions for handling Multi-Media operations. Also, the data and instruction cache sizes were increased to 16 kilobytes each.
The Pentium II, first introduced in May of 1997, is a variation on the Pentium Pro theme. It used a new processor code named “Klamath” by Intel. It was much like the Pentium Pro but with the MMX instructions added and the larger L1 cache of the Pentium MMX.
The Pentium II comes in a new package that looks more like a game cartridge than a microprocessor. This new package is called a single edge contact or SEC cartridge. The CPU on the left is the original Pentium II. Later, Intel changed the Pentium II package to the style shown on the right. The Pentium III also uses this new package.
Inside the plastic and metal housing, the Pentium II looks like this. The Klamath microprocessor is mounted on a small printed circuit board between two large memory chips, which serve as half of the cache memory. Two additional cache memory chips are soldered to the other side of the board. This approach is much more cost effective than the Pentium Pro Packaging and it allows Intel to use off-the-shelf memory chips for the cache. The cache runs at one-half the processor speed, over an independent bus referred to as the “backside” bus.
This unique package plugs into a special socket called Slot 1. Normally a fan and heat sink are added to aid in cooling.
Pentium III is a faster version of the Pentium II. Because it uses a smaller geometry, a faster, lower-voltage, and cooler-operating processor is possible. Speeds of 1,000 MHz or higher are currently available. Caches of 2 Mbytes are also now available.
Pentium 4 is a completely upgraded version of the Pentium III. Because it uses an even smaller geometry, a faster clock, and lower-voltage, amazing speeds can be accomplished. However, the Pentium 4 uses a lot more power than most of its predecessors, so it requires large heatsinks with fans.
The Pentium 4 takes a lot more motherboard space than previous processors, largely because it requires a very large heatsink.
Intel introduced a low-end processor called the Celeron. It is offered with no cover, and no heat sink. The original model had no L2 cache at all, although models with small L2 caches are available. Celeron is intended to compete with AMD and Cyrix for the low-end processor market, however the Celeron CPUs often perform nearly as well as a regular Pentium of the same speed. The original Celeron processors were terrible, but the second generation is a great buy! The bare CPU is shown at the top. In this brief review we left out dozens of interesting microprocessors that have played significant roles in the evolution of the personal computer. However, we have covered the more important members of the Intel Family.
The Pentium M (M for mobile processor) is not a direct descendent from Pentium 4. Instead, it uses the core processor from the Pentium III with the interface bus of a Pentium 4. This allowed it to support larger data and address locations and operate at very low power levels. The Pentium M is able to run faster than an equivalent Pentium 4, draw less power, and produce less heat. The Pentium M is a 32-bit processor that uses the x86 instruction set.
Before Pentium D, PC CPU manufacturers competed on faster and faster raw clock speeds. Pentium D concentrated on power efficiency and the number of cores in the processor. The Pentium D is the first Intel desktop CPU to put two CPUs in the same package, and is referred to as dual-core . Two cores provide a huge performance boost when during multitasking, and also allow certain applications to run much faster. With the Pentium D, motherboard bus speeds exceed 500 MHz while clock speeds are between 2.66 GHz and 3.73 GHz.
Intel’s Itanium processors are an entirely new design that is primarily intended to be used in servers and other expensive and high-performance systems. The Itanium processor is not designed to run at extremely high clock speeds. Instead, it runs several processes in parallel, but only with a 64-bit operating system and 64-bit application software. The combination allows relatively slower clock speeds to handle the same workload as a Pentium CPU that runs with a much faster clock.
Although the Pentium D and Core Duo processors appear to be identical, the Core Duo has many internal performance and efficiency improvements over Pentium D. For example, Core Duo has better memory bus management and new instructions available to the operating system and applications. The Core brand of microprocessors provides 32-bit microarchitecture CPUs for laptops, and 64-bit microarchitecture CPUs for desktop computing.
The Core 2 Duo provides better operational efficiencies between its two cores, adds over two megabytes of cache RAM to each of the core processors, and operates at half the power of the Pentium D. The Core 2 Duo is a good choice if you want a cost-effective and efficient power CPU. The Core 2 Duo is popular for portable computers because they provide a huge performance increase at virtually no power increase of loss in battery life.
The Core 2 Duo CPU contains four separate processors in the same package. Although this effectively doubles the processor capabilities, it also doubles the power consumed and the heat that is radiated by the CPU.
AMD is a competitor of Intel and currently designs their own processors that have unique features and strong performance that makes them quite popular. One of the most popular non-Intel CPUs used in consumer PCs is the AMD K6. It is a less expensive CPU than Intel’s equivalent, and AMD claims that it is just as fast as any Pentium. The model shown here is a 500 MHz processor, which was part of a name-brand PC that cost just over $500.
When discussing modern PCs, the term “Multi” is thrown around a lot as in: Multicore, Multiprocessing, Multithreading, and Multitasking. In today’s presentation we will attempt to sort all this out so that you can understand each of these important concepts. As always, let’s begin this presentation with its objectives.
When you complete this presentation, you will be able to: Explain the difference between multitasking and multiprocessing. Explain the difference between multithreading and multiprocessing. List several disadvantages of achieving multiprocessing by using multiple MPU packages. Explain the difference between cooperative and preemptive multitasking.
Explain the difference between symmetrical and asymmetrical multiprocessing. Discuss the internal structure of the Pentium D, Core 2 Duo, and Core 2 Quad microprocessors.
Obviously, “Multi” means more than one. But the term is used so many different ways when discussing PCs that it often helps to stop and ask: “More than one what?” In the world of personal computers, the four most popular terms starting with the “multi” prefix are: Multitasking, Multithreading, multiprocessing, and multicore. Let’s take each of these terms one at a time and be sure we understand what they mean.
Multitasking can be defined as the apparent simultaneous execution of two or more programs by a single processor. The key word here is “apparent.” What appears to be simultaneous execution is actually concurrent execution. That is, the processor works on one program for an instant and the next program in the next instant. Because the processor is so fast it appears to be executing both programs simultaneously. Multitasking dates back to the earlier days of Windows.
This diagram may help you to visualize the nature of multitasking. It is as if the processor were constantly switching back and forth between the twp programs. That is, the processor executes instructions from Program 1 for a moment and then switches to Program 2 for the next moment. Generally, this speeds the overall process because one program does not have to wait for the other to finish.
Two different forms of Multitasking are popular: Cooperative multitasking and Preemptive multitasking.
With cooperative multitasking, the operating system (OS) transfers control to the programs themselves and the programs determine when the switching occurs. When Program 1 has control, Program 2 can not run until Program 1 gives up control. Obviously then, the two programs must cooperate if they are to share the single processor. Early versions of Windows used this approach.
With preemptive multitasking, the operating system (OS) controls the switching. That is, the OS executes each program in turn for a specific period of time, although the program being executed can give up control before it allotted time is up. Later versions of Windows use this approach.
The important points to remember about Multitasking is that two (or more) programs are executed concurrently. Think of their functions as being chopped up, with the pieces being executed alternately one after another.
Somewhat similar to Multitasking is a different concept called Multithreading . A single program or application can be written so that it can be executed as two or more “threads” of instructions. A “thread” can be thought of as a stand alone task. For example, in a video processing application the video information could be processed as one thread; the audio as another. If the application is written this way, it is said to be multithreaded.
This diagram may help you to visualize multithreading. Here a single application has been written so that it has two threads. It is as if the processor were constantly switching back and forth between the two threads. That is, the processor executes instructions from Thread 1 for a moment and then switches to Thread 2 for the next moment. Generally, this speeds the overall application because one thread does not have to wait for the other to finish.
Perhaps this somewhat over simplified example will illustrate the process. Here a single video processing program of some kind has split the video function and the audio function into separate threads. The processor switches back and forth between the two threads executing a block of instructions from one thread before switching to the other. By switching back and forth between the two threads very quickly, the processor can keep the video and audio in sync while processing each separately.
Here are some final thoughts on multithreading. Threads occur within a single application. The application must be written for multithreading. Not all applications lend themselves to this form of parallelization. Also, the processor must be able to handle multithreading. Not all processors do.
While multithreading has been around for a long time, the Intel optimized its Pentium 4 to take full advantage of multithreading. They called it Hyperthreading. The Pentium 4’s processing function can be divided between two threads in such a way that it appears to have two processing cores. In the Pentium 4, these were referred to as logical cores. The two cores were only an illusion created by clever design. But it did not remain an illusion for long.
In 2005 Intel introduced the first true dual-core CPU, which it called Pentium D. Originally introduced as essentially two Pentium 4 dies in a single package, it was soon upgraded to dual Pentium 4 cores on a single die. It allows a PC to run two different applications (entirely separate programs) simultaneously. Also, it allows two different users to access the same PC simultaneously, which was not possible with earlier processors. It required a new chipset that supports dual core operation and works best with applications written specifically for dual core.
This ability to run two programs simultaneously is called multiprocessing . The concept of multiprocessing has been around for years, but has been confined to servers and high end workstations. In the past multiprocessing could only be achieved by using multiple CPU packages. By placing two processing cores in one package, the Pentium D brought multiprocessing to the personal computer for the first time.
Two types of multiprocessing are possible: symmetrical and asymmetrical. With symmetrical multiprocessing, t he operating system assigns tasks as it sees fit. With as ymmetrical multiprocessing, t he program designer chooses the processor at the time the program is written. The Pentium D (which we just discussed) and the Core 2 (which we will discuss next), both use symmetrical multiprocessing.
Why is having two processors in a single package so much better than using two processors in separate packages? Well mainly because the cost of the processing function is cut just about in half. Dual core needs only one CPU, one socket, one heat sink, one fan, one fan cable, and half as much board space. Dual packages needs twice as much of all the above.
Because the Pentium D was made up of two Pentium 4 cores, it was not optimized for dual processing. Intel redesigned the architecture of the CPU, optimizing it for multiprocessing. The result is called “Core” architecture. Apparently, this is Intel’s new trade name that replaces “Pentium”. One of the early processors to use this new architecture is the Core 2 Duo.
This drawing shows a representation of how the Core 2 family of processors is constructed. Two execution core are shown at the top and a unified L2 cache is shown at the bottom. One of the problems with the Pentium D was that the dual processors each had its own independent L2 cache. If core 1 needed data that was in core 2’s L2 cache, it had to access it through the front side bus, which of course defeats the purpose of a cache. Also, in the Pentium D the total L2 cache space was always split 50/50 and could not change even though some other allocation might have been more efficient for a particular situation. Core 2 solved this problem with the Unified L2 cache, where the two cores share a common cache. Not only can each core directly access the entire cache space, the amount of cache “assigned” to each can be allocated on the fly to fit the situation. This is just one example of the design changes that Intel made to optimize Core 2 for multiprocessing. According to Intel, the Core 2 Duo is up to 40% faster than the Pentium D at the same clock speed and yet it runs considerably cooler.
A slight variation on the Core 2 Duo is the Core 2 Extreme. Think of it as the highest speed Core 2 Duo device. In addition, the Core 2 Extreme allows over-clocking, whereas the Core 2 Duo does not. Over-clocking is a technique used by some high-end enthusiasts in which the processor is run at a higher speed than that recommended by the manufacturer.
And of course, it didn’t end there. It never does. In 2006, Intel introduced the Core 2 Quad. At the time this is being written, it consisted of two Core 2 dies in a single package. And while it is not available at the time, we predict that in the near future…
… all four cores will be placed on a single die. There is also an Extreme four core version. Again, the highest speed member of the family and with over-clocking allowed. Clearly, the race is on to pack as many cores as possible into a single package. It will be interesting to see where this trend eventually leads.
Before we leave this presentation, let’s review the objectives. Explain the difference between multitasking and multiprocessing. Explain the difference between multithreading and multiprocessing. List several disadvantages of achieving multiprocessing by using multiple MPU packages. Explain the difference between cooperative and preemptive multitasking.
Explain the difference between symmetrical and asymmetrical multiprocessing. Discuss the internal structure of the Pentium D, Core 2 Duo, and Core 2 Quad microprocessors.
Core i3 processors have their integrated graphics processor restricted to a maximum clock speed of 1100 MHz, and all Core i3 processors have the 2000 series IGP, which is restricted to 6 execution cores.
Microcontroller versus general-purpose microprocessors
General-purpose microprocessors are processors like the Intel’s x86 family (8086, 80286, 80386, 80486, and the Pentium) or the Motorola’s 680x0 family (68000, 68010, 68020, 69030, 68040, etc. These microprocessor do not contain A RAM, ROM nor I/O ports on the chips themselves. They are general-purpose processors.