Types of Concurrency Models

Types of Concurrency Models

2021, Jan 02    

Concurrency vs Parallelism

  • Concurrency is about dealing with lots of things at once
  • Parallelism is about doing lots of things at once

Levels of Parallelism

  • Bit-level: i.e. 16, 32, 64-bit architectures.
  • Instruction-level
  • Data parallelism
  • Task-level

A Big Question

What is the bottleneck between Parallel-Multi-Core-Fast & need to your code to go Non-Blocking?

Answer: Shared Mutable State

Why so many concurrency models

Concurrency Models help eliminate complexities which rises when one have to choose to move the code execution in concurrent mode. They try to imply mechanisms to somehow manage/eliminate Shared Mutable State.


One can achieve concurrency without a worry if they can

  • Eliminate Shared Mutable State
    OR
  • Make the data share transactional. (ACID Properties)


Features of Concurrency Models

All the models which exists till date sort of tries to eliminate one of (shared/mutable/state) or make things transactional.

Types of Concurrency Models

  • Threads & Locks
  • Atomics Condition Variables & Timeouts (beyond locks)
  • Functional Programming
  • Actors
  • Communicating Sequential Process
  • Software Transaction Memory
  • Data Parallelism
  • Lambda Approach
  • Event-based System