Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Further comments on Dijkstra's concurrent programming control problem

Further comments on Dijkstra's concurrent programming control problem Short Communications Computer Systems Further Comments on Dijkstra's Concurrent Programming Control Problem Murray A. Eisenberg and Michael R. McGuire control [i] : = 2; for j : = 1 step 1 until N do i f j ~ i and control [j] = 2 then goto L0; L3: ffcontrol [k] ~ 0 and k ~ i then goto L0; /_,4: k : = i; critical section; L5: f o r j := k step 1 until N, 1 step 1 until k do i f j ~ k and control [j] ~ 0 then begin k:=j; goto L6 end; L6: control [i] : = 0; L7: remainder of cycle; goto L0; end L2: The MITRE Corporation Key Words and Phrases: critical section, concurrent programming control, multiprocessing CR Categories: 4.32 E.W. Dijkstra [1] presented an algorithm whereby N mainly independent computers, with a common data store as their sole means of communication, could contend for exclusive control of any given resource (storage, t/o, etc.). To use the resource, a computer had to gain access to the "critical section" of the algorithm, within which one and only one computer at a time could be executing. Dijkstra's algorithm was ingeniously constructed to prevent "after y o u - - a f t e r y o u " blockage of the system while restricting critical section access to one computer at a time. His algorithm, however, allowed the possibility that an individual computer, when contending for access might have to wait indefinitely. Knuth [2] provided a modification to Dijkstra's algorithm which guaranteed access by an individual contending computer within 2~'-~ -- 1 turns. This algorithm was further modified by deBruijn [3] to provide access, within 1/~ N(N -- l ) turns. The following algorithm guarantees that a computer need wait no more than N1 turns. The common store (within which single reads and writes are undividable operations) consists of: integer array control [1 :N]; integer k where 1 < k < N, and each element of "control" is either 0, 1, or 2. All elements of "control" are initially zero; the initial value of k is immaterial. To prove that this algorithm is an acceptable substitute for Knuth's it will be shown that: (a) There exists a protected area within the algorithm which includes the critical section and within which no two computers can be simultaneously processing. (b) The system cannot be blocked (i.e. when one or more computers are contending for entrance to their critical section, the decision to determine that some computer may enter may not be postponed indefinitely). (c) An individual computer cannot be blocked (i.e. the decision to determine that an individual contending computer may enter its critical section may not be postponed indefinitely). Proof. First observe that no two computers can be simultaneously processing between their statements L3 and L6 for the same reason this is true in both Dijkstra's and Knuth's algorithms. Secondly, observe that the system cannot be blocked; for if none of the computers contending for access to its critical section has yet passed its statement L3, then after a point, the value of k will be constant, and the first contending computer in the cyclic ordering (k, k + 1, ..., N, 1, ..., k - 1) will meet no resistance. Finally, observe that no single computer can be blocked. Before any computer having executed its critical section can exit the area protected from simultaneous processing, it must designate as its unique successor the first contending computer in the cyclic ordering, assuring the choice of any individual contending computer within N -- 1 turns. Received February 1972; revised March 1972 http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Communications of the ACM Association for Computing Machinery

Further comments on Dijkstra's concurrent programming control problem

Loading next page...
 
/lp/association-for-computing-machinery/further-comments-on-dijkstra-s-concurrent-programming-control-problem-i4fYzXLQoX

References (2)

Publisher
Association for Computing Machinery
Copyright
Copyright © 1972 by ACM Inc.
ISSN
0001-0782
DOI
10.1145/355606.361895
Publisher site
See Article on Publisher Site

Abstract

Short Communications Computer Systems Further Comments on Dijkstra's Concurrent Programming Control Problem Murray A. Eisenberg and Michael R. McGuire control [i] : = 2; for j : = 1 step 1 until N do i f j ~ i and control [j] = 2 then goto L0; L3: ffcontrol [k] ~ 0 and k ~ i then goto L0; /_,4: k : = i; critical section; L5: f o r j := k step 1 until N, 1 step 1 until k do i f j ~ k and control [j] ~ 0 then begin k:=j; goto L6 end; L6: control [i] : = 0; L7: remainder of cycle; goto L0; end L2: The MITRE Corporation Key Words and Phrases: critical section, concurrent programming control, multiprocessing CR Categories: 4.32 E.W. Dijkstra [1] presented an algorithm whereby N mainly independent computers, with a common data store as their sole means of communication, could contend for exclusive control of any given resource (storage, t/o, etc.). To use the resource, a computer had to gain access to the "critical section" of the algorithm, within which one and only one computer at a time could be executing. Dijkstra's algorithm was ingeniously constructed to prevent "after y o u - - a f t e r y o u " blockage of the system while restricting critical section access to one computer at a time. His algorithm, however, allowed the possibility that an individual computer, when contending for access might have to wait indefinitely. Knuth [2] provided a modification to Dijkstra's algorithm which guaranteed access by an individual contending computer within 2~'-~ -- 1 turns. This algorithm was further modified by deBruijn [3] to provide access, within 1/~ N(N -- l ) turns. The following algorithm guarantees that a computer need wait no more than N1 turns. The common store (within which single reads and writes are undividable operations) consists of: integer array control [1 :N]; integer k where 1 < k < N, and each element of "control" is either 0, 1, or 2. All elements of "control" are initially zero; the initial value of k is immaterial. To prove that this algorithm is an acceptable substitute for Knuth's it will be shown that: (a) There exists a protected area within the algorithm which includes the critical section and within which no two computers can be simultaneously processing. (b) The system cannot be blocked (i.e. when one or more computers are contending for entrance to their critical section, the decision to determine that some computer may enter may not be postponed indefinitely). (c) An individual computer cannot be blocked (i.e. the decision to determine that an individual contending computer may enter its critical section may not be postponed indefinitely). Proof. First observe that no two computers can be simultaneously processing between their statements L3 and L6 for the same reason this is true in both Dijkstra's and Knuth's algorithms. Secondly, observe that the system cannot be blocked; for if none of the computers contending for access to its critical section has yet passed its statement L3, then after a point, the value of k will be constant, and the first contending computer in the cyclic ordering (k, k + 1, ..., N, 1, ..., k - 1) will meet no resistance. Finally, observe that no single computer can be blocked. Before any computer having executed its critical section can exit the area protected from simultaneous processing, it must designate as its unique successor the first contending computer in the cyclic ordering, assuring the choice of any individual contending computer within N -- 1 turns. Received February 1972; revised March 1972

Journal

Communications of the ACMAssociation for Computing Machinery

Published: Nov 1, 1972

There are no references for this article.