G - Physics – 06 – F
Patent
G - Physics
06
F
354/230.6
G06F 9/46 (2006.01)
Patent
CA 1213066
NON-SPINNING TASK LOCKING USING COMPARE AND SWAP ABSTRACT OF THE DISCLOSURE A method or controlling both shared and exclusive access for a resource in a multiprocessor system wherein a first-in/first-out queue is formed for tasks suspended while awaiting access and wherein access to the resource provides that control of access required for manipulation of the first-in/first-out queue which is not provided by the atomic nature of compare (double) and swap. Each member of the queue has indicators of the access it requested and of the next most recently enqueued member which has a corresponding indicator. A lockword is established having two parts, a lock flag indicating the status of the resource, whether available, under shared ownership or under exclusive ownership and a lock pointer pointing to the most recently enqueued task. In requesting or releasing access, an initial guess is made as to the value of the lockword and a projected lockword is calculated based on the guess. Then an atomic reference is made to the lockword during which no other multiprocessor has access to the lockword. During the atomic reference, the lockword is compared to the guess of the lockword and if the guess is correct, the lockword is replaced by the projected lockword which rearranges the queue for the requesting or releasing task. If the guess was incorrect, the value of the lockword is used to calculate another projected lockword. If another task can affect the next tasks to gain access, the process with the atomic reference is repeated until no intervening changes occur between atomic references.
469465
International Business Machines Corporation
Saunders Raymond H.
LandOfFree
Non-spinning task locking using compare and swap does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Non-spinning task locking using compare and swap, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Non-spinning task locking using compare and swap will most certainly appreciate the feedback.
Profile ID: LFCA-PAI-O-1210487