Computers run spreadsheets, web browsers, games, take pictures, do email and a host of many other (hopefully) useful things. Computer servers, desktops and mobile devices do the many things they do because of a chip at their heart that executes instructions. These instructions are collectively known as a program. (More on programs in a later post.) This chip is called a microprocessor or a CPU (Central Processing Unit), and it executes several millions of instructions per second. Each instruction is rather simple, so it takes a rather horrifying number of executed instructions to, say, open a web page in your browser. Good thing the microprocessor is really, really fast.
There are many, many ways to describe the guts of a microprocessor. A computational instruction execution engine, an uncountable number of transistors, a set of defined functional units, and a serious power hog and heat generator are a few of the ways of looking at a microprocessor. Let’s look at a microprocessor from the point of view of it being a set of functional units for now.
Let’s warp the idea of a household kitchen for a moment and view it though the lens of it being a set of functional units. You’ve got your refrigerator, freezer, sink, faucet, blender, oven, microwave, dishwasher, cupboards, toaster and so on. Each “functional unit” in your kitchen does one thing really well. A faucet is good at producing water and a toaster is great at toasting bagels. A faucet is maybe not so good at toasting bagels and I sincerely hope your toaster does not produce water. All of these functional unit things together make up your kitchen. A microprocessor is similar in that it has math units for computation, caches for temporary storage of instructions and data, instruction execution units to execute programs, memory management units to keep memory straight (wish my brain had one), and so on. Fewer functional units in total than your kitchen, actually. A bit smaller than your kitchen, too.
The good news is that many years of experience, experimentation and observation have paid off in that we have microprocessors today that can do many, many things reasonably well. It’s more of a generic efficiency apartment kitchen than a Uno’s Pizzeria and Grill kitchen. Nothing wrong with that, I don’t need an Uno’s kitchen when I make dinner tonight.
The bad news is that the functional units in a microprocessor are fixed at what they are. Let’s say I needed another freezer in my generic efficiency apartment kitchen, it’s not so easy to add one. Same thing with a microprocessor. They typically have four floating point math functional units to, well, do math. If my program only needs four at a time for execution, all is well. But let’s say I have a weather prediction program I want to execute and I want to predict the weather tomorrow. A weather prediction program has a lot of math in it, as you may imagine. If I want the program to complete before tomorrow, I’d really like to have, say, a thousand floating point math functional units all running at the same time. It’s not so easy to add more math functional units to a microprocessor.
A microprocessor is a good general purpose instruction execution engine that has a fixed number of functional units to do the work it needs to do. In later posts, I will touch on the nature of programs, alternative ways and means to compute stuff, programs that translate geek-readable text into microprocessor instructions and whatever else might appear in our wandering.