|Home > Parallel processing concepts > Concurrency|
Concurrent applications have multiple operations in progress at the same time. These can operate in parallel or in serial through the use of a time sharing system.
In a concurrent application, multiple tasks attempt to share the same data. Access to this data must be managed to prevent complex problems such as race conditions, deadlocks, and livelocks.
Concurrent applications require concurrent data structures. A concurrent data structure is a data structure that enables multiple tasks to gain access to the data with no concurrency problems.
Data parallel applications use concurrent data structures. These are the sorts of data structures that you typically use in OpenCL.
OpenCL includes atomic operations to help manage interactions between threads. Atomic operations provide one thread exclusive access to a data item while it modifies it. The atomic operation enables one thread to read, modify, and write the data item with the guarantee that no other thread can modify the data item at the same time.