Data parallelism vs Task parallelism


Data Parallelism

Data Parallelism means concurrent execution of the same task on each multiple computing core.

Let’s take an example, summing the contents of an array of size N. For a single-core system, one thread would simply sum the elements [0] . . . [N − 1]. For a dual-core system, however, thread A, running on core 0, could sum the elements [0] . . . [N/2 − 1] and while thread B, running on core 1, could sum the elements [N/2] . . . [N − 1]. So the Two threads would be running in parallel on separate computing cores.

Task Parallelism

Task Parallelism means concurrent execution of the different task on multiple computing cores.

Consider again our example above, an example of task parallelism might involve two threads, each performing a unique statistical operation on the array of elements. Again The threads are operating in parallel on separate computing cores, but each is performing a unique operation.

The key differences between Data Parallelisms and Task Parallelisms are −

Data ParallelismsTask Parallelisms
1. Same task are performed on different subsets of same data.
1. Different task are performed on the same or different data.
2. Synchronous computation is performed.
2. Asynchronous computation is performed.
3. As there is only one execution thread operating on all sets of data, so the speedup is more.
3. As each processor will execute a different thread or process on the same or different set of data, so speedup is less.
4. Amount of parallelization is proportional to the input size.
4. Amount of parallelization is proportional to the number of independent tasks is performed.
5. It is designed for optimum load balance on multiprocessor system.
5. Here, load balancing depends upon on the e availability of the hardware and scheduling algorithms like static and dynamic scheduling.
raja
Published on 11-Oct-2019 16:10:03
Advertisements