Programmer: Bill McQuain CS 1704: Process Management Simulation Script file: kill.txt Log file: KillLog.txt ---------------------------------------------------------------------- Command 1: start P00 0 Process 0 added. ---------------------------------------------------------------------- Command 2: start P01 1 Process 1 added. ---------------------------------------------------------------------- Command 3: start P02 2 Process 2 added. ---------------------------------------------------------------------- Command 4: start P03 3 Process 3 added. ---------------------------------------------------------------------- Command 5: start P04 4 Process 4 added. ---------------------------------------------------------------------- Command 6: kill 2 Process 2 removed. ---------------------------------------------------------------------- Command 7: ps all Processes with priority 0: P00 PID: 0 Priority: 0 Processes with priority 1: P01 PID: 1 Priority: 1 Processes with priority 2: Processes with priority 3: P03 PID: 3 Priority: 3 Processes with priority 4: P04 PID: 4 Priority: 4 ---------------------------------------------------------------------- Command 8: switch 0 Process 0 now in run mode. ---------------------------------------------------------------------- Command 9: call main 0 0 Call to main initiated. ---------------------------------------------------------------------- Command 10: call F 0 0 Call to F initiated. ---------------------------------------------------------------------- Command 11: ps 0 P00 PID: 0 Priority: 0 Call stack: Function: F Parameters: Locals: Function: main Parameters: Locals: ---------------------------------------------------------------------- Command 12: kill 0 Process 0 removed. ---------------------------------------------------------------------- Command 13: ps all Processes with priority 0: Processes with priority 1: P01 PID: 1 Priority: 1 Processes with priority 2: Processes with priority 3: P03 PID: 3 Priority: 3 Processes with priority 4: P04 PID: 4 Priority: 4 ---------------------------------------------------------------------- Command 14: start P01 0 Process 5 added. ---------------------------------------------------------------------- Command 15: start P02 0 Process 6 added. ---------------------------------------------------------------------- Command 16: start P11 1 Process 7 added. ---------------------------------------------------------------------- Command 17: start P12 1 Process 8 added. ---------------------------------------------------------------------- Command 18: start P13 1 Process 9 added. ---------------------------------------------------------------------- Command 19: start P14 1 Process 10 added. ---------------------------------------------------------------------- Command 20: ps all Processes with priority 0: P01 PID: 5 Priority: 0 P02 PID: 6 Priority: 0 Processes with priority 1: P01 PID: 1 Priority: 1 P11 PID: 7 Priority: 1 P12 PID: 8 Priority: 1 P13 PID: 9 Priority: 1 P14 PID: 10 Priority: 1 Processes with priority 2: Processes with priority 3: P03 PID: 3 Priority: 3 Processes with priority 4: P04 PID: 4 Priority: 4 ---------------------------------------------------------------------- Command 21: kill 8 Process 8 removed. ---------------------------------------------------------------------- Command 22: kill 1 Process 1 removed. ---------------------------------------------------------------------- Command 23: kill 7 Process 7 removed. ---------------------------------------------------------------------- Command 24: kill 10 Process 10 removed. ---------------------------------------------------------------------- Command 25: kill 9 Process 9 removed. ---------------------------------------------------------------------- Command 26: ps all Processes with priority 0: P01 PID: 5 Priority: 0 P02 PID: 6 Priority: 0 Processes with priority 1: Processes with priority 2: Processes with priority 3: P03 PID: 3 Priority: 3 Processes with priority 4: P04 PID: 4 Priority: 4 ---------------------------------------------------------------------- Command 27: switch 0 Process 5 now in run mode. ---------------------------------------------------------------------- Command 28: call main 0 0 Call to main initiated. ---------------------------------------------------------------------- Command 29: call F 3 100 200 300 1 100 Call to F initiated. ---------------------------------------------------------------------- Command 30: set 2 111 Killing process P01 ---------------------------------------------------------------------- Command 31: ps all Processes with priority 0: P02 PID: 6 Priority: 0 Processes with priority 1: Processes with priority 2: Processes with priority 3: P03 PID: 3 Priority: 3 Processes with priority 4: P04 PID: 4 Priority: 4 ---------------------------------------------------------------------- Command 32: kill 3 Process 3 removed. ---------------------------------------------------------------------- Command 33: kill 4 Process 4 removed. ---------------------------------------------------------------------- Command 34: kill 6 Process 6 removed. ---------------------------------------------------------------------- Command 35: ps all Processes with priority 0: Processes with priority 1: Processes with priority 2: Processes with priority 3: Processes with priority 4: ---------------------------------------------------------------------- Command 36: start P30 3 Process 11 added. ---------------------------------------------------------------------- Command 37: ps all Processes with priority 0: Processes with priority 1: Processes with priority 2: Processes with priority 3: P30 PID: 11 Priority: 3 Processes with priority 4: ---------------------------------------------------------------------- Command 38: kill 100000 Process not found: 100000 ---------------------------------------------------------------------- Command 39: exit Exiting script execution. ----------------------------------------------------------------------