out3.txt

来自「Programs for Distributed Systems. BE sem」· 文本 代码 · 共 120 行

TXT
120
字号
                          **** 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 + =
减小字号Ctrl + -
显示快捷键?