;SPM_quot;What is Concurrency?;SPM_quot; Concurrency is the property of a
system that more than one thing is
(apparently) happening at the same time.
In the software world, we commonly find 3 types of concurrency:
-
Fake concurrency provided by a multiprogramming environment or
operating system. This exists down to the level of
Interrupts and up through System Calls to concurrent programming
environments. Although processes appear to run concurrently, the use
of a single processor ensures that this is not really so.
-
Real concurrency in a tightly coupled multi-processor
environment. This is of less interest us here, as communication
in such an environment is generally provided by hardware, and
such devices are special purpose (e.g. graph reduction
machines for functional languages, DAPS etc.).
-
Real concurrency in a Loosely Coupled Distributed system.
It is this third that is our main concern.
There are three challenges with concurrent systems:
-
Scheduling
This is concerned with when and how concurrent tasks can make appropriate use of shared
system resources such as CPU, I/O and memory.
-
Synchronization
This is concerned with the relative ordering of events between
related threads of control in the system. For instance, a process
cannot extract a character from a buffer until a user has typed one in.
More generally, when a resource or object is common or shared, then an arbitrary
interleaving of accesses to it can lead to unpredictable results.
-
Communication
When two processes or threads of control synchronize, they usually
wish to exchange information. There are many different techniques for
exchanging information, such as shared memory, message passing,
remote procedure call, rendezvous.
What distinguishes distributed systems from parallel systems?
Firstly, communication is characteristically much more expensive
between distributed processes that between parallel ones. This usually
rules out models based on simulated shared memory.
Secondly, hardware in a distributed system is generally fault tolerant.
The network may partition, processing nodes fail, and yet a
distributed algorithm may successfully complete. Note that this is
only a potential for greater reliability. The economics of disk prices
versus processor and network proces meant that many so-called
distributed filesystems evolved in the 1980s that were less relaible
than centralised ones, since the separation of application/client from
server/disk via a network simply introduced more points of failure
than a centralized system would have.