Conceptually, the right thing to do when a process enters an exception due to an abnormal execution is to kill the process. Hence, Exit is the correct action.
In Stage 19, this leaves the OS to schedule IDLE forever because there is no other process to run.
This is an issue now because the OS of Stage 19 is half cooked.
By Stage 21, a Shell process will also run as a permanent system process other than IDLE. The shell is a user process created by the kernel.
Thereafter, the scheduler will have more meaningful processes to schedule than just keep scheduling IDLE.
Hence, don't bother about fixing this issue temporarily now. For now, you can even make Exit system call HALT the machine to avoid the infinite loop.
Sir I am currently at stage 19 and I have a problem with the exception handler. In the documentation it is given that when encountering exceptions other than page fault we have to call
Exit process function of the process management module, and then call the Scheduler module.
In this current stage the machine only have 2 process idle.xsm and odd.xsm when an exception encountered in the odd.xsm process the exception handler calls the scheduler module and it is repeatedly scheduling the ideal process since there is no other process to be scheduled, and the machine is in an infinite loop state.
I was thinking if instead of calling the scheduler module inside the exception handler module, if we call the exit system call would that be a problem, or should i have to edit my scheduler module.
Sincerely
Senan Jude
B180706CS
CSE B