Glossary · Automation software engineering and architecture
Concurrency
Also known as: Concurrent execution
German: Nebenläufigkeit
In software engineering, concurrency is the property of a system in which several tasks, threads or processes are in progress during overlapping time periods, either interleaved on one processor or running in parallel on several cores, and may share resources or data.
- Software engineering
In one sentence
Concurrency means several tasks or threads are in progress during overlapping periods and may share resources or data.
Example
A controller runs a 1 ms motion task, a 10 ms logic task and a background communication task concurrently, all accessing shared axis data.
How it applies
- Engineering: Controllers commonly run several cyclic and event tasks with different priorities, and multicore controllers can run them truly in parallel. Shared data between tasks needs protection, or values can become inconsistent.
- Risks: Concurrency introduces defects that are hard to reproduce: race conditions, Deadlock, Livelock and priority inversion. They often appear only under specific timing, for example at high load or after a hardware change.
- Documentation: Document the task model: which tasks exist, their priorities, cycle times, watchdogs and which data they share. This information is essential for developers extending the program and for service engineers analyzing timing problems.
Concurrency vs. parallelism
Concurrency means tasks overlap in time; parallelism means they actually execute at the same instant on different processors. A single-core controller can be concurrent without being parallel. Parallel execution makes some concurrency defects more likely, because interleavings that were rare become common.