Skip to content Skip to navigation

OpenStax_CNX

You are here: Home » Content » Task Parallelism

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Task Parallelism

Module by: Jeff Meisel. E-mail the author

Summary: Task parallelism is the concurrent execution of independent tasks in software. Task parallelism allows multiprocessor and multicore computers to achieve performance speed-up by running threads in parallel, which allow better utilization of the computing resources available in the system.

Task parallelism is the concurrent execution of independent tasks in software. Multiprocessor and multicore computer systems benefit from task parallelism by being able to execute two or more things at one time. Consider a single-core processor that is running a Web browser and a word-processing program at the same time. Although these applications are implemented with unique sets of threads, they still ultimately share the same processor. Now consider a second scenario in which the same two programs are running on a dual-core processor. On the dual-core machine, these two applications essentially can run independently of one another. Although they may share some resources that prevent them from running completely independently, the dual-core machine can handle the two parallel tasks more efficiently.

Multitasking is a more common term in computing that is related to task parallelism, where multitasking has a more broad definition of "multiple tasks running at the same time." However, it's important to note that multitasking does not necessarily imply true parallelism in software, it may just mean a computer is switching between tasks fast enough to give off the illusion that things are happening in parallel. On a multicore system, multitasking can occur in a truly parallel fashion.

Figure 1: Application-level multitasking is a form of task parallelism, where the operating system auto load balances the tasks across the available CPUs in a system.
Example of Multitasking
Example of Multitasking (multitasking.jpg)

The act of implementing task parallelism in software is referred to as "task decomposition." It is considered one of the simplest methods for implementing parallelism in a specific application, in comparison with other techniques such as data decomposition. An application must be multithreaded so the system can execute the tasks in parallel. As an example, consider a measurement or control application that is composed of different tasks: Data Acquisition, User Interface, Network Communication, and Logging to Disk.

Figure 2: For individual applications to use task parallelism, the software components must be decomposed such that the tasks represent unique threads.
Example of Multithreading
Example of Multithreading (multithreading in labview.jpg)

In addition, the primary tasks can be decomposed into sub-tasks for even more levels of task parallelism. An example programming language that is well-suited for task parallelism is LabVIEW, which is a graphical dataflow language. The visual representation allows developers to see the parallelism in the code source. For example, the Data Acquisition task can be broken up into two separate tasks (analog and digital), as illustrated below.

Figure 3: Task for analog acquisition and task for digital acquisition.
Task Parallelism in the LabVIEW programming language
Task Parallelism in the LabVIEW programming language (task parallelism in labview.jpg)

More information on parallel programming techniques can be found at the Multicore Programming Fundamentals Whitepaper Series.

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks