?? out3.txt
字號:
**** MENU ****
1. Bully's Algorithm
2. Ring Algorithm
3. Exit
Enter your choice: 1
Enter how many process: 3
Enter the priority of process 1 : 2
Is process with id 1 is active? (0/1): 1
Enter the priority of process 2 : 1
Is process with id 2 is active? (0/1): 0
Enter the priority of process 3 : 1
Is process with id 3 is active? (0/1): 1
Enter the process id that invokes election algorithm: 3
Process 3 has invoked election lgorithm
Election message is sent to processes 3
Process with id 1 is the co-ordinator
Do you want to continue? (y/n): y
Enter the process with id 1 is active or not (0/1): 1
Enter the process with id 2 is active or not (0/1): 1
Enter the process with id 3 is active or not (0/1): 1
Enter the process id that invokes election algorithm: 2
Election message is sent to processes 1, 2, 3
Process with id 3 is the co-ordinator
Do you want to continue? (y/n): n
**** MENU ****
1. Bully's Algorithm
2. Ring Algorithm
3. Exit
Enter your choice: 2
Enter how many process: 3
Enter the priority of process 1 : 2
Is process with id 1 is active? (0/1): 1
Enter the priority of process 2 : 1
Is process with id 2 is active? (0/1): 1
Enter the priority of process 3 : 1
Is process with id 3 is active? (0/1): 1
Process 1 has invoked algorithm
Process 1 is a Co-ordinator
Do you want to continue? (y/n):n
**** MENU ****
1. Bully's Algorithm
2. Ring Algorithm
3. Exit
Enter your choice: 3
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -