[From the last episode: We looked at the role of the operating systemSoftware – or firmware – that handles the low-level aspects of a computer or IoT device. It gets direct access to all the resources. Software asks the OS for access to those resources. in computers.]
We often toss around the words “microprocessorA computer chip that does computing work for a computer. It may do general work (like in your home computer) or it may do specialized work (like some of the processors in your smartphone).” and “CPUStands for "central processing unit." Basically, it's a microprocessor - the main one in the computer. Things get a bit more complicated because, these days, there may be more than one microprocessor. But you can safely think of all of them together as the CPU.” as if they were self-defining. But, in fact, there are lots of different types of processor. Let’s review a few of them here, since different types are good for different tasks.
We’ll start with the basic thing that we usually mean when we say, “microprocessor”: it’s what used to be an entire computer that would have filled an entire room in the old days, only now it’s shrunk way down into a single chipAn electronic device made on a piece of silicon. These days, it could also involve a mechanical chip, but, to the outside world, everything looks electronic. The chip is usually in some kind of package; that package might contain multiple chips. "Integrated circuit," and "IC" mean the same thing, but refer only to electronic chips, not mechanical chips.. Hence the “micro” thing. It’s the most generic version of what we described back in our introduction to processors.
Hello, Neumann!
It generally follows what’s called the “von Neumann” (pronounced “fawn NOI-mahn”) style of processing: you take a bunch of instructions and execute them in sequence. There are more specifics to the technical nature of a von Neumann architecture (as opposed to others like a Harvard architecture), but we won’t worry about those here.
In its simplest form, it can’t do more than one thing at a time, and, compared to other processors, it might seem a bit plodding. But it’s a reliable, general workhorse that can pretty much do anything. It just might not be the fastest way to do everything. On the other hand, processors that are better at a few specialized tasks may not be able to do everything in the way a microprocessor can.
When you see the word, “CPU,” it usually refers to this as well. (Yes, we’re not always consistent in our use of terms.) Most systemsThis is a very generic term for any collection of components that, all together, can do something. Systems can be built from subsystems. Examples are your cell phone; your computer; the radio in your car; anything that seems like a "whole.", if they have other types of processors, will have a CPU as the “main brain” in the system. That CPU delegates certain tasks to those other processors used as acceleratorsA circuit, usually done with hardware instead of software, that can perform some task faster than a processor can. Instead of the processor handling the task itself, it offloads the work to the accelerator, and the accelerator sends the answer (whatever that means for the task) back to the processor.. That main brain is often referred to as the hostThe main processing unit in a system. It controls how all other processors in the system operate. It’s the boss.. Which I guess is kinder than calling it the boss, which it kind of is.
The Big MAC
One specialized task for processors relates to digital signal processingA processor optimized for handling computations involving digital representations of analog signals.. Back in the day, we processed radio and other signals the old-fashioned way: using analog circuitry, since they’re analog signals. In other words, they’re not binaryA base-2 counting system (rather than the base-10 system we usually use). Digits can be 0 or 1. 1s and 0s. But, over time, we learned how to transform analog signals into digital signals, and then we can process them entirely differently – and, potentially, with greater fidelity.
That kind of processing tends to involve a lot of matricesAn array of numbers, having both rows and columns of numbers. Widely used for many complex tasks.. In fact, matrices are a big part of many specialized tasks. Some of you may remember your matrix math from high school or college. Multiplication happens to be a common task.
Let’s say I want to multiply the two following vectorsA one-row matrix that can have any number of columns. (which are 1-by-something matrices – in this case, 1×4),
That process includes the following calculation (which, in this case, is equivalent to the dot product of the two vectors):
aw+bx+cy+dz
That is, we take pairs of numbers, multiply them, and then add all those products together – also known as accumulating the products. This particular notion is referred to as multiply-accumulate, or MAC. And different types of processors have specialized hardwareIn this context, "hardware" refers to functions in an IoT device that are built into a silicon chip or some other dedicated component. It's distinct from "software," which refers to instructions running on a processor. just for this purpose.
The most common of those is the DSP, or digital signal processor. Specifics vary by brand, of course, but, in general, they can do a couple things really well: MAC math and doing the same operation to more than one number at the same time. So, if you have a bunch of matrices to multiply, for instance, and they’re all the same size, then you could work on them all at the same time as long as you’re doing the same thing to all of them at any given moment. This is referred to as single-instruction, multiple data, or SIMD (pronounced “sim-dee”). We often use DSPs for processing communications signals.
Other MAC Daddies
There’s another realm that involves lots of matrices: graphics. And SIMD applies here as well, since, in many cases, you’re working on a bunch of pixels, each of which is independent of the others. So being able to operate on a ton of pixels at the same time really helps speed up graphics processing. That’s why engineers invented a specialized graphics processor, the graphics processing unitA processor optimized for rendering images and video on a display., or GPU. You’ll find these on higher-end graphics cards in computers. They don’t do the main computing in the computer; that’s what the microprocessor is for. They act as accelerators just for the display graphics.
There are other similar types of accelerators that process still images (like you’d get from your camera); so-called networkA collection of items like computers, printers, phones, and other electronic items that are connected together by switches and routers. A network allows the connected devices to talk to each other electronically. The internet is an example of an extremely large network. Your home network, if you have one, is an example of a small local network. processing units, or NPUs, which process networking packets; cryptography processors; and so forth – all of which are processors, but probably not as well known as CPUs, DSPs, and GPUs.
Finally, there’s a new kind of processor being toyed with these days: something that can efficiently execute artificial intelligenceA broad term for technology that acts more human-like than a typical machine, especially when it comes to "thinking." Machine learning is one approach to AI. operations on so-called neural networksA type of conceptual network organized in a manner inspired by our evolving understanding of how the brain works.. Neural nets are a whole topic unto themselves – one that we’ll defer for now. Honestly, they’re unlike other types of circuit, and they’re not well understood in the overall industry. It’s been a specialist’s game. That’s changing, but the whole thing is pretty loosey-goosey right now as different companies compete to do the best job calculating neural nets as accelerators attached to main processors.
Summing Up – Er – Accumulating
The following table summarizes these processors.
We’ll look more at variations in the main flavors and where you might find them in the next couple of posts.
Leave a Reply