Data Communication

Concurrency

Concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome.

Why do I have a dedicated course on concurrency, when I have SE350?

Concurrency is the ability of your program to deal with many things at once and is achieved through multithreading.

I also have a page on Parallel Computing.

I learned a lot about this at NVIDIA, this is fundamental for Accelerated Computing.

I will learn this in CS343.

One of the core concepts is a lock. Two Phase Locking.

Concurrency \neq Parallellism

The difference:

  • Concurrency involves a shared memory location, and the different threads actually “read” the information provided by the previous threads.
  • With parallelism, copies are not necessarily in communication with each other, but they are running at the same time in parallel.

Do not confuse concurrency with parallelism which is about doing many things at once.

So in concurrency, processes share the same resources, which results in many problems… more below.

Resources

See Multithreading (C++).

Dangers of Concurrency...

With great power comes greater responsibility. Some issues Involved with Concurrency (multiple threads):

Concepts