请输入您要查询的百科知识:

 

词条 Raymond's algorithm
释义

  1. Algorithm

     Nodal Properties  Algorithm 

  2. Complexity

  3. References

  4. See also

Raymond's Algorithm is a lock based algorithm for mutual exclusion on a distributed system. It imposes a logical structure (a K-ary tree) on distributed resources. As defined, each node has only a single parent, to which all requests to attain the token are made.

Algorithm

Nodal Properties

  1. Each node has only one parent to whom received requests are forwarded
  2. Each node maintains a FIFO queue of requests each time that it sees the token;
  3. If any node is forwarding privilege to other node and has non-empty queue then it forwards a request message along

Algorithm

  1. If a node i (not holding the token) wishes to receive the token in order to enter into its critical section, it sends a request to its parent, node j.
    • If node j FIFO is empty, node j shifts i into its FIFO queue; j then issues a request to its parent, k, that it desires the token
    • If node j FIFO queue is not empty, it simply shifts i into the queue
  2. When node k has token and receives the request from j it sends token to j and sets j as its parent
  3. When node j receives the token from k, it forwards the token to i and i is removed from the queue of j
    • If the queue of j is not empty after forwarding the token to i, j must issue a request to i in order to get the token back

Note: If j wishes to request a token, and its queue is not empty, then it places itself into its own queue. Node j will utilize the token to enter into its critical section if it is at the head of the queue when the token is received.

Complexity

Raymond's algorithm is guaranteed to be O(log n) per critical section entry if the processors are organized into a K-ary tree. Additionally, each processor needs to store at most O(log n) bits because it must track O(1) neighbors.[1]

References

1. ^R. Chow, T. Johnson; Distributed Operating Systems & Algorithms; Addison-Wesley, 1997.

See also

  • Ricart-Agrawala algorithm
  • Lamport's Bakery Algorithm
  • Lamport's Distributed Mutual Exclusion Algorithm
  • Maekawa's Algorithm
  • Suzuki-Kasami's Algorithm
  • Naimi-Trehel's Algorithm

1 : Concurrency control algorithms

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/14 9:39:15