Programmer: Bill McQuain CS 1704: Process Management Simulation Script file: TerminationScript.txt Log file: TerminationLog.txt ---------------------------------------------------------------------- Command 1: start P01 0 Process 0 added. ---------------------------------------------------------------------- Command 2: start P02 0 Process 1 added. ---------------------------------------------------------------------- Command 3: start P03 0 Process 2 added. ---------------------------------------------------------------------- Command 4: switch 0 Process 0 now in run mode. ---------------------------------------------------------------------- Command 5: call main 0 3 10 20 30 Call to main initiated. ---------------------------------------------------------------------- Command 6: ps all Running process: P01 PID: 0 Priority: 0 Call stack: Function: main Parameters: Locals: 10 20 30 Processes with priority 0: P02 PID: 1 Priority: 0 P03 PID: 2 Priority: 0 Processes with priority 1: Processes with priority 2: Processes with priority 3: Processes with priority 4: ---------------------------------------------------------------------- Command 7: return main terminated for process P01 ---------------------------------------------------------------------- Command 8: ps all Processes with priority 0: P02 PID: 1 Priority: 0 P03 PID: 2 Priority: 0 Processes with priority 1: Processes with priority 2: Processes with priority 3: Processes with priority 4: ---------------------------------------------------------------------- Command 9: switch 0 Process 1 now in run mode. ---------------------------------------------------------------------- Command 10: call main 0 0 Call to main initiated. ---------------------------------------------------------------------- Command 11: call F 1 5 0 Call to F initiated. ---------------------------------------------------------------------- Command 12: call G 0 1 10 Call to G initiated. ---------------------------------------------------------------------- Command 13: call H 0 0 Call to H initiated. ---------------------------------------------------------------------- Command 14: ps 1 P02 PID: 1 Priority: 0 Call stack: Function: H Parameters: Locals: Function: G Parameters: Locals: 10 Function: F Parameters: 5 Locals: Function: main Parameters: Locals: ---------------------------------------------------------------------- Command 15: return Function H terminated for process P02 ---------------------------------------------------------------------- Command 16: return Function G terminated for process P02 ---------------------------------------------------------------------- Command 17: return Function F terminated for process P02 ---------------------------------------------------------------------- Command 18: return main terminated for process P02 ---------------------------------------------------------------------- Command 19: ps all Processes with priority 0: P03 PID: 2 Priority: 0 Processes with priority 1: Processes with priority 2: Processes with priority 3: Processes with priority 4: ---------------------------------------------------------------------- Command 20: switch 0 Process 2 now in run mode. ---------------------------------------------------------------------- Command 21: call main 0 0 Call to main initiated. ---------------------------------------------------------------------- Command 22: return main terminated for process P03 ---------------------------------------------------------------------- Command 23: ps all Processes with priority 0: Processes with priority 1: Processes with priority 2: Processes with priority 3: Processes with priority 4: ---------------------------------------------------------------------- Command 24: exit Exiting script execution. ----------------------------------------------------------------------