-
Notifications
You must be signed in to change notification settings - Fork 0
/
test3.ariel
33 lines (27 loc) · 945 Bytes
/
test3.ariel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
INCLUDE "my_definitions.h"
NPROCS = 4
Define 0 = MANAGER
Define 1 = BACKUP
Define 2 = BACKUP
Define 3 = BACKUP
MIA_SEND_TIMEOUT = 800000 # Manager Is Alive -- manager side
TAIA_RECV_TIMEOUT = 1500000 # This Agent Is Alive timeout--manager side
TASK 1 = "Backbone0" IS NODE 1, TASKID {BACKBONE_TASKID}
TASK 2 = "Backbone1" IS NODE 2, TASKID {BACKBONE_TASKID}
TASK 3 = "Backbone2" IS NODE 3, TASKID {BACKBONE_TASKID}
TASK 4 = "Backbone3" IS NODE 4, TASKID {BACKBONE_TASKID}
LOGICAL 1 = "LBack0" IS TASK 1 END
LOGICAL 2 = "LBack1" IS TASK 2 END
LOGICAL {ALL} ="all" IS TASK 1,2,3,4 END
NUMTASKS 0 = 5
NUMTASKS 1 = 5
NUMTASKS 2 = 5
NUMTASKS 3 = 5
IF [ PHASE (T{VOTER1}) == {HAS FAILED} ]
THEN
STOP T{VOTER1}
SEND {WAKEUP} T{SPARE}
SEND {VOTER1} T{SPARE}
SEND {SPARE} T{VOTER2}
SEND {SPARE} T{VOTER3}
FI