Reader Level:
ARTICLE

Synchronization in Parallel threads

Posted by Paul Abraham Articles | Multithreading in C# July 02, 2001
The Threads makes us able to run multitasks at a time. In fact Computers (John von Neumann Architecture) don't execute the tasks parallel .The OS gives threads permission (depend on thread priority) to work on CPU. The sufficient degree of parallelism keeps the CPU busy and it is efficient.
  • 0
  • 0
  • 12813
Download Files:
 

The Threads makes us  able to run multitasks at a time. In fact  Computers (John von Neumann Architecture)  don't  execute  the tasks parallel. The OS gives threads permission  (depend on thread priority)  to work on CPU. The sufficient degree of parallelism keeps the CPU busy  and it is efficient.

Now, let us look  a   simple mathematical problem:

We want  calculate the Integral from the function  f(x) =  x*x +exp(x). using  trapezoid formula. We will use different threads to calculate the integral from partial  functions  f1(x) = x*x  and f2(x) = exp(x). After the calculation we will add the values together.

This article is tested on RTM by Zhanbo Sun.

COMMENT USING

Trending up