------------------------------------------------------- CS 6570: JDA Expected Output ------------------------------------------------------- TEST : 9A) Distributed Philosophers Implement: InitDphilBAD.java Compile : javac InitDphilBAD.java Execute : java InitDphilBAD Output : OK should be BAD in your version DphilOK #1 Running DphilOK #2 Running DsemOK #1 Running Critical region: DphilOK #1 Remainder region: DphilOK #1 Critical region: DphilOK #2 Remainder region: DphilOK #2 Critical region: DphilOK #1 Remainder region: DphilOK #1 Critical region: DphilOK #2 Remainder region: DphilOK #2 Critical region: DphilOK #1 Remainder region: DphilOK #1 Critical region: DphilOK #2 Remainder region: DphilOK #2 Critical region: DphilOK #1 Remainder region: DphilOK #1 Critical region: DphilOK #2 Remainder region: DphilOK #2 Critical region: DphilOK #1 Remainder region: DphilOK #1 Critical region: DphilOK #2 Remainder region: DphilOK #2 Critical region: DphilOK #1 Remainder region: DphilOK #1 Critical region: DphilOK #2 Remainder region: DphilOK #2 ------------------------------------------------------- TEST : 12) LeLann Leader Implement: InitLelannBAD.java Compile : javac InitLelannBAD.java Execute : java InitLelannBAD Output : OK should be BAD in your version LelannOK #1 Running LelannOK #2 Running LelannOK #3 Running LelannOK #4 Running LelannOK #5 Running LelannOK #6 Running LelannOK #1 sends temp_id: 1 LelannOK #2 sends temp_id: 2 LelannOK #3 sends temp_id: 3 LelannOK #4 sends temp_id: 4 LelannOK #5 sends temp_id: 5 LelannOK #6 sends temp_id: 6 LelannOK #1 sends next_temp_id: 6 LelannOK #2 sends next_temp_id: 6 LelannOK #3 sends next_temp_id: 6 LelannOK #4 sends next_temp_id: 6 LelannOK #5 sends next_temp_id: 6 LelannOK #6 ELECTS ITSELF LEADER temp_id: 6 LelannOK #1 KNOWS leader: 6 LelannOK #2 KNOWS leader: 6 LelannOK #3 KNOWS leader: 6 LelannOK #4 KNOWS leader: 6 LelannOK #5 KNOWS leader: 6 ------------------------------------------------------- TEST : 13) Peterson Leader Implement: InitLeaderBAD.java Compile : javac InitLeaderBAD.java Execute : java InitLeaderBAD Output : OK should be BAD in your version LeaderOK #1 Running LeaderOK #2 Running LeaderOK #3 Running LeaderOK #4 Running LeaderOK #5 Running LeaderOK #6 Running LeaderOK #1 sends temp_id: 1 LeaderOK #2 sends temp_id: 2 LeaderOK #3 sends temp_id: 3 LeaderOK #4 sends temp_id: 4 LeaderOK #5 sends temp_id: 5 LeaderOK #6 sends temp_id: 6 LeaderOK #2 sends next_temp_id: 1 LeaderOK #3 sends next_temp_id: 2 LeaderOK #4 sends next_temp_id: 3 LeaderOK #5 sends next_temp_id: 4 LeaderOK #6 sends next_temp_id: 5 LeaderOK #1 sends next_temp_id: 6 LeaderOK #1 sends temp_id: 6 LeaderOK #2 relays temp_id: 6 LeaderOK #3 relays temp_id: 6 LeaderOK #4 relays temp_id: 6 LeaderOK #5 relays temp_id: 6 LeaderOK #6 relays temp_id: 6 LeaderOK #1 ELECTS ITSELF LEADER temp_id: 6 LeaderOK #2 KNOWS leader: 1 LeaderOK #3 KNOWS leader: 1 LeaderOK #4 KNOWS leader: 1 LeaderOK #5 KNOWS leader: 1 LeaderOK #6 KNOWS leader: 1 ------------------------------------------------------- TEST : 13A) Flood Peterson Leader Implement: InitFloodBAD.java Compile : javac InitFloodBAD.java Execute : java InitFloodBAD Output : OK should be BAD in your version FloodOK #1 Running FloodOK #2 Running FloodOK #3 Running FloodOK #4 Running FloodOK #5 Running FloodOK #6 Running FloodOK #1 is not the leader FloodOK #5 is not the leader FloodOK #2 is not the leader FloodOK #6 is the leader FloodOK #3 is not the leader FloodOK #4 is not the leader ------------------------------------------------------- TEST : 20) Gallager MST Implement: InitMSTBAD.java Compile : javac InitMSTBAD.java Execute : java InitMSTBAD Output : OK should be BAD in your version see MST.out.txt for details edge 1 3 1 Branch edge 3 1 1 Branch edge 4 6 1 Branch edge 6 4 1 Branch edge 6 3 1 Branch edge 3 6 1 Branch edge 2 5 1 Branch edge 4 1 2 Rejected edge 5 2 1 Branch edge 3 4 2 Rejected edge 1 4 2 Rejected edge 4 3 2 Rejected edge 2 3 1 Branch edge 3 2 1 Branch edge 2 1 2 Rejected edge 1 2 2 Rejected edge 5 6 2 Rejected edge 6 5 2 Rejected ------------------------------------------------------- TEST : 21) BFS Spanning Tree Implement: InitBFSBAD.java Compile : javac InitBFSBAD.java Execute : java InitBFSBAD Output : OK should be BAD in your version BFSOK #1 Running BFSOK #2 Running BFSOK #3 Running BFSOK #4 Running BFSOK #5 Running BFSOK #6 Running BFSOK #1 is root of BFS spanning tree BFSOK #2 has parent 1 BFSOK #3 has parent 1 BFSOK #4 has parent 1 BFSOK #1 has child 2 BFSOK #5 has parent 2 BFSOK #6 has parent 3 BFSOK #1 has child 3 BFSOK #2 has child 5 BFSOK #1 has child 4 BFSOK #3 has child 6 BFSOK #5 completed BFSOK #4 completed BFSOK #6 completed BFSOK #2 completed BFSOK #3 completed BFSOK #1 completed ------------------------------------------------------- TEST : 21A) Bellman Shortest Path Implement: InitSPBAD.java Compile : javac InitSPBAD.java Execute : java InitSPBAD Output : OK should be BAD in your version SPOK #1 Running SPOK #2 Running SPOK #3 Running SPOK #4 Running SPOK #5 Running SPOK #6 Running SPOK #1 is at distance 0 via parent -1 SPOK #5 is at distance 6 via parent 2 SPOK #2 is at distance 4 via parent 3 SPOK #6 is at distance 3 via parent 3 SPOK #3 is at distance 0 via parent 1 SPOK #4 is at distance 4 via parent 6 ------------------------------------------------------- TEST : 21B) Async Shortest Path with Term Detection Implement: InitASPBAD.java Compile : javac InitASPBAD.java Execute : java InitASPBAD Output : OK should be BAD in your version ASPOK #1 Running ASPOK #2 Running ASPOK #3 Running ASPOK #4 Running ASPOK #5 Running ASPOK #6 Running ASPOK #2 is at distance 7 via parent 1 ASPOK #3 is at distance 0 via parent 1 ASPOK #4 is at distance 6 via parent 1 ASPOK #4 is at distance 5 via parent 3 ASPOK #5 is at distance 9 via parent 2 ASPOK #2 is at distance 4 via parent 3 ASPOK #6 is at distance 3 via parent 3 ASPOK #5 is at distance 6 via parent 2 ASPOK #4 is at distance 4 via parent 6 ASPOK #1 knows algorithm is TERMINATED ASPOK #2 knows algorithm is TERMINATED ASPOK #3 knows algorithm is TERMINATED ASPOK #4 knows algorithm is TERMINATED ASPOK #5 knows algorithm is TERMINATED ASPOK #6 knows algorithm is TERMINATED ------------------------------------------------------- TEST : 23) Logical Clock Mutual Exclusion Implement: InitTclockBAD.java Compile : javac InitTclockBAD.java Execute : java InitTclockBAD Output : OK should be BAD in your version your numbers may be off depending on where you put your printlns TclockOK #1 Running TclockOK #2 Running TclockOK #3 Running TclockOK #4 Running TclockOK #5 Running TclockOK #6 Running TclockOK #1 Trying at time 1 TclockOK #2 Trying at time 1 TclockOK #3 Trying at time 1 TclockOK #4 Trying at time 1 TclockOK #5 Trying at time 1 TclockOK #6 Trying at time 1 TclockOK #1 enters critical section at time 15 TclockOK #1 exits critical section at time 16 TclockOK #1 Trying at time 18 TclockOK #2 enters critical section at time 17 TclockOK #2 exits critical section at time 18 TclockOK #2 Trying at time 21 TclockOK #3 enters critical section at time 21 TclockOK #3 exits critical section at time 22 TclockOK #3 Trying at time 25 TclockOK #4 enters critical section at time 24 TclockOK #4 exits critical section at time 25 TclockOK #4 Trying at time 28 TclockOK #5 enters critical section at time 28 TclockOK #5 exits critical section at time 29 TclockOK #5 Trying at time 32 TclockOK #6 enters critical section at time 33 TclockOK #6 exits critical section at time 34 TclockOK #6 Trying at time 37 TclockOK #1 enters critical section at time 38 TclockOK #1 exits critical section at time 39 TclockOK #1 Trying at time 42 TclockOK #2 enters critical section at time 46 TclockOK #2 exits critical section at time 47 TclockOK #2 Trying at time 50 TclockOK #3 enters critical section at time 53 TclockOK #3 exits critical section at time 54 TclockOK #3 Trying at time 57 TclockOK #4 enters critical section at time 59 TclockOK #4 exits critical section at time 60 TclockOK #4 Trying at time 63 TclockOK #5 enters critical section at time 64 TclockOK #5 exits critical section at time 65 TclockOK #5 Trying at time 68 TclockOK #6 enters critical section at time 69 TclockOK #6 exits critical section at time 70 TclockOK #6 Trying at time 73 TclockOK #1 enters critical section at time 74 TclockOK #1 exits critical section at time 75 TclockOK #2 enters critical section at time 82 TclockOK #2 exits critical section at time 83 ------------------------------------------------------- TEST : 24) Phased Algs: BFS and Leader Election Implement: InitBFS1BAD.java Compile : javac InitBFS1BAD.java Execute : java InitBFS1BAD Output : OK should be BAD in your version BEGIN: BFS BFS1OK #4 BFS completed. Parent: 1 Children: BFS1OK #5 BFS completed. Parent: 2 Children: BFS1OK #6 BFS completed. Parent: 3 Children: BFS1OK #2 BFS completed. Parent: 1 Children: 5 BFS1OK #3 BFS completed. Parent: 1 Children: 6 BFS1OK #1 BFS completed. Parent: -1 Children: 2 3 4 END: BFS BEGIN: FINDMAX BFS1OK #4 MAX completed. Max 4 is on path toward -1 BFS1OK #5 MAX completed. Max 5 is on path toward -1 BFS1OK #6 MAX completed. Max 6 is on path toward -1 BFS1OK #2 MAX completed. Max 5 is on path toward 5 BFS1OK #3 MAX completed. Max 6 is on path toward 6 BFS1OK #1 MAX completed. Max 6 is on path toward 3 END: FINDMAX 6 BEGIN: NOTIFYMAX 6 BFS1OK #1 reset. Parent: 3 Children: 2 4 BFS1OK #3 reset. Parent: 6 Children: 1 BFS1OK #6 reset. Parent: -1 Children: 3 END: NOTIFYMAX BEGIN: NEWROOT BFS1OK #3 knows 6 is new root BFS1OK #1 knows 6 is new root BFS1OK #2 knows 6 is new root BFS1OK #4 knows 6 is new root BFS1OK #5 knows 6 is new root -------------------------------------------------------