Mathematical Foundations
Synchronization was originally a process based concept whereby a lock could be obtained on an object. Its primary usage was in databases. There are two types of (file) lock; read-only and read-write. Read-only locks may be obtained by many processes or threads. Read-write locks are exclusive, that is by a single process/thread at a time.
Although locks were derived for file databases, data is also shared in memory between processes and threads. Sometimes more than one object (or file) is locked at a time. If they are not locked simultaneously they can overlap, causing a deadlock exception.
Java and Ada only have exclusive locks because they are thread based and rely on the compare-and-swap processor instruction (see mutex). Read-only locks were proposed by David Hostettler Wain in ~2005 as useful addition to Java and Ada since they allow greater parallelization. It has yet to be widely implemented.
An abstract mathematical foundation for synchronization primitives is given by the history monoid. There are also many higher-level theoretical devices, such as process calculi and Petri nets, which can be built on top of the history monoid.
Read more about this topic: Synchronization (computer Science)
Famous quotes containing the words mathematical and/or foundations:
“What is history? Its beginning is that of the centuries of systematic work devoted to the solution of the enigma of death, so that death itself may eventually be overcome. That is why people write symphonies, and why they discover mathematical infinity and electromagnetic waves.”
—Boris Pasternak (18901960)
“and the oxen near
The worn foundations of their resting-place,
The holy manger where their bed is corn
And holly torn for Christmas. If they die,
As Jesus, in the harness, who will mourn?
Lamb of the shepherds, Child, how still you lie.”
—Robert Lowell (19171977)