Maths encyclopedia and lessons  
Search

Mathematics Encyclopedia and Lessons

 
     
 

Lessons

Popular
Subjects

algebra
arithmetic
calculus
equations
geometry
differential equations
trigonometry
number theory
probability theory
more
 

References

applied mathematics
mathematical games
mathematicians
more
 
 

Parallel programming

Parallel programming (also concurrent programming), is a computer programming technique that provides for the execution of operations concurrently, either within a single computer, or across a number of systems. In the latter case, the term distributed computing is used. Multiprocessor machines achieve better performance by taking advantage of this kind of programming.

In parallel programming, single tasks are split into a number of subtasks that can be computed relatively independently and then aggregated to form a single coherent solution. Parallel programming is most effective for tasks that can easily broken down into independent tasks such as purely mathematical problems, e.g. factorisation.

One way to achieve parallel programming is through distributed computing, which is a method of information processing in which work is performed by separate computers linked through a communications network.

Parallel programming often relies often specialized algorithms, which allow problems to be split up into pieces. However, not all algorithms can be optimized to run in a distributed environment, often leading to different performance issues from single processor systems.

Major issues stem from trying to prevent concurrent processes from interfering with each other. Consider the following algorithm for a checking account:

1:bool withdraw(int withdrawal) {
2:    if( balance > withdrawal ) {
3:        balance -= withdrawal;
3:        return true;
4:    } else return false;
5:}

Suppose the balance=500, and two processes both call withdraw(300), and withdraw(350), concurrently. If line 2 in both operatons, executes before line 3, in both cases balance>withdrawal. However, more will end up being withdrawn, than the balance. These sorts of issues require the use of Concurrency control, or non-blocking algorithm.

Pioneers in the field of concurrent programming include Edsger Dijkstra and C. A. R. Hoare.

See also

External links



01-04-2007 01:18:14
The contents of this article are licensed from Wikipedia.org
under the GNU Free Documentation License. How to see transparent copy