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:
“All science requires mathematics. The knowledge of mathematical things is almost innate in us.... This is the easiest of sciences, a fact which is obvious in that no ones brain rejects it; for laymen and people who are utterly illiterate know how to count and reckon.”
—Roger Bacon (c. 1214c. 1294)
“Honorable Senators: My sincerest thanks I offer you. Conserve the firm foundations of our institutions. Do your work with the spirit of a soldier in the public service. Be loyal to the Commonwealth and to yourselves and be brief; above all be brief.”
—Calvin Coolidge (18721933)