文件名称:RICARTA-AGRAWALA--ALGORITHM
介绍说明--下载内容均来自于网络,请自行研究使用
Also known an Ricart and Agrawala’s algorithm.
• Nodes use logical clocks: all events are in total order.
• When a node wants to enter a CS (Critical Section) it sends a message.
• The message contains following information
1. Process id of the process
2. The name of CS that the process wants to enter
3. A unique timestamp generated by the process for request msg
• When a node receives such a request
1. If it is not interested in this CS, it replies OK immediately.
2. If it is interested in this CS:
If its message’s timestamp was older, then replies OK,
Else, it puts the sender in a queue and doesn’t reply anything (yet)
3. If it is already in the CS, it puts the sender in a queue and doesn’t
reply anything (yet).
• A node enters the CS when it received OK from all other nodes.
• A node that exits the CS, sends immediately OK to all nodes that it may have
placed in the queue.-Also known an Ricart and Agrawala’s algorithm.
• Nodes use logical clocks: all events are in total order.
• When a node wants to enter a CS (Critical Section) it sends a message.
• The message contains following information
1. Process id of the process
2. The name of CS that the process wants to enter
3. A unique timestamp generated by the process for request msg
• When a node receives such a request
1. If it is not interested in this CS, it replies OK immediately.
2. If it is interested in this CS:
If its message’s timestamp was older, then replies OK,
Else, it puts the sender in a queue and doesn’t reply anything (yet)
3. If it is already in the CS, it puts the sender in a queue and doesn’t
reply anything (yet).
• A node enters the CS when it received OK from all other nodes.
• A node that exits the CS, sends immediately OK to all nodes that it may have
placed in the queue.
• Nodes use logical clocks: all events are in total order.
• When a node wants to enter a CS (Critical Section) it sends a message.
• The message contains following information
1. Process id of the process
2. The name of CS that the process wants to enter
3. A unique timestamp generated by the process for request msg
• When a node receives such a request
1. If it is not interested in this CS, it replies OK immediately.
2. If it is interested in this CS:
If its message’s timestamp was older, then replies OK,
Else, it puts the sender in a queue and doesn’t reply anything (yet)
3. If it is already in the CS, it puts the sender in a queue and doesn’t
reply anything (yet).
• A node enters the CS when it received OK from all other nodes.
• A node that exits the CS, sends immediately OK to all nodes that it may have
placed in the queue.-Also known an Ricart and Agrawala’s algorithm.
• Nodes use logical clocks: all events are in total order.
• When a node wants to enter a CS (Critical Section) it sends a message.
• The message contains following information
1. Process id of the process
2. The name of CS that the process wants to enter
3. A unique timestamp generated by the process for request msg
• When a node receives such a request
1. If it is not interested in this CS, it replies OK immediately.
2. If it is interested in this CS:
If its message’s timestamp was older, then replies OK,
Else, it puts the sender in a queue and doesn’t reply anything (yet)
3. If it is already in the CS, it puts the sender in a queue and doesn’t
reply anything (yet).
• A node enters the CS when it received OK from all other nodes.
• A node that exits the CS, sends immediately OK to all nodes that it may have
placed in the queue.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
RICARTA-AGRAWALA ALGORITHM.cpp