Coordinating Access To Resources
One of the major issues in concurrent computing is preventing concurrent processes from interfering with each other. For example, consider the following algorithm for making withdrawals from a checking account represented by the shared resource balance
:
Suppose balance=500
, and two concurrent threads make the calls withdraw(300)
and withdraw(350)
. If line 3 in both operations executes before line 5 both operations will find that balance > withdrawal
evaluates to true
, and execution will proceed to subtracting the withdrawal amount. However, since both processes perform their withdrawals, the total amount withdrawn will end up being more than the original balance. These sorts of problems with shared resources require the use of concurrency control, or non-blocking algorithms.
Because concurrent systems rely on the use of shared resources (including communication media), concurrent computing in general requires the use of some form of arbiter somewhere in the implementation to mediate access to these resources.
Unfortunately, while many solutions exist to the problem of a conflict over one resource, many of those "solutions" have their own concurrency problems such as deadlock when more than one resource is involved.
Read more about this topic: Concurrent Computing
Famous quotes containing the words access and/or resources:
“Power, in Cases world, meant corporate power. The zaibatsus, the multinationals ..., had ... attained a kind of immortality. You couldnt kill a zaibatsu by assassinating a dozen key executives; there were others waiting to step up the ladder; assume the vacated position, access the vast banks of corporate memory.”
—William Gibson (b. 1948)
“Your children dont have equal talents now and they wont have equal opportunities later in life. You may be able to divide resources equally in childhood, but your best efforts wont succeed in shielding them from personal or physical crises. . . . Your heart will be broken a thousand times if you really expect to equalize your childrens happiness by striving to love them equally.”
—Marianne E. Neifert (20th century)