7.1 PARALLELISM INTRODUCTION 179
■ 7.1.1 Computer System Categories
Computer systems can be divided into four main categories. To understand
these, you need to think of how a program runs in a slightly different way.
From the perspective of the main processor in a computer, the program arrives
in a stream of instructions that have to be decoded and then executed. The data
can also be seen as arriving in a stream. Our four categories are then based on
whether there is one or multiple streams of instructions and data.
Single Instruction Single Data
Single instruction single data (SISD) is the classic single processor model that
includes all early computers and many modern computers. In this case, there is
one processor that can carry out one program instruction at a time. This pro-
cessor can work with only one set of data at a time as well. These sequential
systems exhibit no parallelism, as will be seen in comparison with the other
three categories.
Single Instruction Multiple Data
In single instruction multiple data (SIMD) machines, there is some number of
processors all doing the exact same operation but on different data. SIMD
machines are sometimes referred to as vector processors because their opera-
tion is well suited to doing vector operations, where each processor gets a dif-
ferent element of the vector and after one instruction cycle, the entire vector
has been handled. For example, adding two vectors together requires that each
of the elements be added. The first element of the resulting vector is the sum of
the first elements of the two input vectors, and the second element of the
result is the sum of the second elements of the input vectors. In our SIMD
machine, the instruction given to each processor would be an add, and each
processor would be given one pair of values from the two input vectors. After
this one instruction cycle, the entire result would be available. Notice that if
the vector has N elements, a SISD machine would take N cycles doing one add
per cycle, where a SIMD machine with at least N processors can do the addi-
tion in one instruction cycle.
Multiple Instruction Single Data
The option of having different operations all applied to the same data may
seem strange, because there are not many programs where you need the
results of taking a single data value and squaring it, multiplying it by 2, sub-
tracting 10 from it, and so on. But if we begin to think of this process from a