Parallelism
What is Parallelism?
Parallelism is a concept we first saw in super pipelining. When code can
run in
parallel sections that can be executed independently, much more be can be
done more quickly.
Considerations
When a program runs, it must first realize what can be run in parallel,
which must be considered when a program is written. Creating a
preventable dependency between two tracks of code that would otherwise be
independent and thus parallel slows down execution time. A quick example
of a simple programming idea that could creat dependency is the use of a
variable. In programming, variables tend to hold a number value which can
be changed throughout the program. Thus if two potential tracks of code
contain the same variable, they depend upon each other. However, if the
variable value does need to change in the program, then it can be defined
as being a constant, which is telling the computer that the value of the
variable will not change. The compiler, seeing this, now knows that the
two tracks of code are independent of each other and can be executed in
parallel. Many such small considerations exist that can make a great deal
of difference in execution speed.
The Next Level
We have been talking about parallelism within one computer. However, let's
say that massive computation or simulation was to be computed. Breaking
the code into parallel parts is quicker, but the application is so
massive that the execution time will still be a long, long time. So what
can be done. Well, we create a network between several computers, one
being the master which will look at the application and then those huge
chunks of independent code and send different chunks to the other slave
computers, which will then find parallel parts to the chunk of the
application they have received, sending data back to the master and
between slaves as necessary. All this enable a huge application to be
computed more quickly.
Previous
Next
Home