Monday, April 4, 2011 | By: Louella Marree Cariño

Operating System Case Study no. 6

Job and Process Status

The diagram shows how the operating system controls the execution of processes. It starts on the Hold State wherein the Job is accepted and placed on the queue. When the Job moves to Ready State, it means that the Job is waiting for the CPU. It is also the process the Job is queuing and preparing to execute when given the opportunity. And when the Job is selected, it is now in the state of Running State. In that state, it’s the process where Job is currently being executed. But then, it is not certain that the Job in the Running State would directly go to Finish. Since there are possibilities of interruptions and the unavailability of resources, the Job would be placed in the waiting queue. The CPU would still continue accepting Jobs from the Ready State and those Jobs in the waiting queue would remain in that state until the CPU is ready to execute those Jobs again. After giving signals that the Jobs in the Waiting queue are ready to be processed again, those Jobs would be moved to the Ready State and be executed on the Running State. If nothing else went wrong, the Jobs would be placed in finished indicating that the Jobs were processed successfully.

With these state processes it would be totally impossible of having transition between READY to WAITING and from WAITING to RUNNING.  There are no transitions between Ready and Waiting since the Job in the Ready State would always be placed in the Running State, and after detecting some interruptions or page faults, that would only be the time that the Job would be placed in Waiting State. Another thing is that, the CPU cannot detect interrupts in the Ready State since it is still preparing to be executed.

Between the states from Waiting to Running, it is also not possible to have transition since the Jobs to be executed should be preparing at the Ready State. Besides, it is still necessary for the Jobs in the Waiting queue to send signals for the Jobs to continue processing. And if the Jobs would be placed in the Ready queue, the Jobs could be executed once again. 

0 comments:

Post a Comment