
The Wikipedia articles for Superscalar and Instruction pipeline are pretty good.Ī long time ago, CPUs executed only one machine instruction at a time. And that is an explanation of the example graphic, not how it's actually implemented in the field (that's black magic). In nine clocks, we've executed ten instructions - you can see where pipelining really moves things along. Pipelining allows the parts to be executed simultaneously, so we would end up with something like (for ten instructions A through J): Two instructions in five clocks - a theoretical maximum gain of 100%. If we then add a redundant execution unit and introduce superscalar design, we'd have this, for two instructions A and B: Which would do one instruction in five clocks. In a very simple processor design, every clock a different stage would be completed so we'd have: These are IF (instruction fetch), ID (instruction decode), EX (execute), MEM (update memory), WB (writeback to cache). In the example above, an instruction goes through 5 stages to be "performed". To break it down further, given your recent edit: Here, two instructions are being executed at a time in a five-stage pipeline. This image from Wikipedia shows both concepts in use, as these concepts are best explained graphically: Pipelining divides an instruction into steps, and since each step is executed in a different part of the processor, multiple instructions can be in different "phases" each clock.

We're talking about within a single core, mind you - multicore processing is different. Superscalars can provide much higher performance because each thread gets its own core/execution unit.Superscalar design involves the processor being able to issue multiple instructions in a single clock, with redundant facilities to execute an instruction. Superscalars can execute basic operations such as add and load on separate registers simultaneously, whereas a scalar processor would have to complete one operation before moving on to the next.įor example, a scalar processor may be able to run multiple threads, but they will all share the same core and therefore only run as fast as the slowest thread. The main thing to remember is that certain instruction sets are suited better to certain optimizations. This means that if you have a CPU with three cores on it–one being an old scalar processor–and you run an application that utilizes all three cores, the old third core will be no more than half as fast as if it were completely superscalar. The key point is that scalars cannot perform more than one operation (i.e., carry out more than one instruction) per clock cycle, but superscalars can–up to two instructions in some cases. The terms “scalar” or “superscalar” are not to be confused with “single-core/multi-core.” Scalars are single-core processors, while superscalars may either be single- or multi-cores. The difference between scalar and superscalar processors is that the former process one instruction at a time, whereas the latter can execute several instructions simultaneously. Although the superscalar CPU needs more time to process each operation than a scalar processor, it can do multiple operations in the same amount of time. The superscalar CPU processes multiple operations at a time.
Superscalar procssor full#
Therefore, the scalar processor needs the full number of cycles to process one operation before it can move on to the next. The scalar processor is a more “traditional” CPU, which operates on one task at a time. There are two major types of CPUs used in computers today: Scalar and Superscalar. It’s possible for two identical pieces of hardware to differ in terms of processor architecture and bus sizes.


They call these operations for each CPU cycle. There are many different kinds of CPU which are used in a computer.These differences in terms of hardware and architecture go unnoticed by most people, but they make all the difference when it comes to how a computer works at its core! The majority of them accomplish basic CPU operations such as reading and writing data, simple arithmetic, and address shifting.
