What You Should Know About Concurrency — Part I

Table of Contents

  • Introduction
  • Multiprocessor Architectures: SIMD & MIMD
  • Hidden Concurrency
  • Concurrency Categories: Physical & Logical
  • Subprogram-Level Concurrency
  • Tasks vs Subprograms
  • Task Categories: Lightweight & Heavyweight
  • Synchronization
  • Cooperation Synchronization
  • Competition Synchronization
  • Scheduler
  • Task States
  • Liveness and Deadlock
  • Language Design for Concurrency
  • References & Readings

Introduction

  1. Instruction
  2. Statement
  3. Unit
  4. Program
Concurrency vs Parallelism

Multiprocessor Architectures: SIMD & MIMD

© Cburnett
© Cburnett

Hidden Concurrency

Concurrency Categories: Physical & Logical

Subprogram-Level Concurrency

Tasks vs Subprograms

Task Categories: Lightweight & Heavyweight

Synchronization

Cooperation Synchronization

Producer-Consumer Problem

Competition Synchronization

Racing Condition
  • Semaphores
  • Monitors
  • Message Passing

Scheduler

Task States

  1. New. A task has been created but has not begun its execution.
  2. Ready. Either a task has not been given processor time by the scheduler, or it was blocked for some reason. Ready tasks are stored in a task-ready queue.
  3. Running. A currently executing task.
  4. Blocked. A task’s execution was interrupted for some reason, commonly due to an input or output operation.
  5. Dead. A task that is not active anymore. It has either completed its execution or explicitly killed by the program.
Task States

Liveness and Deadlock

Deadlock Among 3 Tasks

Language Design for Concurrency

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ismayil Shahaliyev

Ismayil Shahaliyev

112 Followers

International Chess Master | MS in CS & Data Analytics (ADA & GW Universities). See the full list of my articles at: http://www.shahaliyev.net/writings.html