Unit II message ordering & snapshots message ordering and group communication: Message ordering paradigms


CS8603:Distributed Systems Department of CSE



tải về 0.79 Mb.
Chế độ xem pdf
trang8/19
Chuyển đổi dữ liệu15.11.2023
Kích0.79 Mb.
#55654
1   ...   4   5   6   7   8   9   10   11   ...   19
MESSAGE ORDERING & SNAPSHOTS
c5 cacdacdiemhtttdl
CS8603:Distributed Systems Department of CSE
2020 – 2021 2. 
9
Jeppiaar Institute of Technology
a receive and ack(M′) is returned.Thus, a cyclic wait is prevented. 
2. Also, while waiting for this permission, if a request(M′) from a lower priority process 
arrives, a permission(M′) is returned and the process blocks until M′ actually arrives. 
Algorithm 6.1 A simplified implementation of synchronous order. 
Code shown is for process Pi , 1 ≤ i ≤ n. 
 
(message types) 
M, ack(M), request(M), permission(M) 
(1) Pi wants to execute SEND(M) to a lower priority process Pj
Pi executes send(M) and blocks until it receives ack(M) from Pj. The send event 
SEND(M) now completes. 
Any M′ message (from a higher priority processes) and request(M′) request for 
synchronization (from a lower priority processes) received during the blocking 
period are queued. 
(2) Pi wants to execute SEND(M) to a higher priority process Pj
(2a) Pi seeks permission from Pj by executing send(request(M)). 
(2b) While Pi is waiting for permission, it remains unblocked. 
(i) If a message M′ arrives from a higher priority process Pk, Pi accepts M′ 
by scheduling a RECEIVE(M′) event and then executes send(ack(M′)) to Pk. 
(ii) If a request(M′) arrives from a lower priority process Pk, Pi executes 
send(permission(M′)) to Pk and blocks waiting for the message M′. When M′ 
arrives, the RECEIVE(M′) event is executed. 
(2c) When the permission(M) arrives, Pi knows partner Pj is synchronized and Pi 
executes send(M). The SEND(M) now completes. 
(3) request(M) arrival at Pi from a lower priority process Pj
At the time a request(M) is processed by Pi, process Pi executes 
send(permission(M)) to Pj and blocks waiting for the message M. When M arrives, the 
RECEIVE(M) event is executed and the process unblocks. 

tải về 0.79 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   4   5   6   7   8   9   10   11   ...   19




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương