Synchronization (computer Science) - Mathematical Foundations

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:

    As we speak of poetical beauty, so ought we to speak of mathematical beauty and medical beauty. But we do not do so; and that reason is that we know well what is the object of mathematics, and that it consists in proofs, and what is the object of medicine, and that it consists in healing. But we do not know in what grace consists, which is the object of poetry.
    Blaise Pascal (1623–1662)

    As men’s habits of mind differ, so that some more readily embrace one form of faith, some another, for what moves one to pray may move another to scoff, I conclude ... that everyone should be free to choose for himself the foundations of his creed, and that faith should be judged only by its fruits.
    Baruch (Benedict)