Process State Diagram
Using the process state diagram, explain why there is no transition:
• From the READY to WAITING.
• From the WAITING to RUNNING.
• From the READY to WAITING.
• From the WAITING to RUNNING.
In a multitasking computer system, processes may occupy a variety of states. These distinct states may not actually be recognized as such by the operating system kernel, however they are a useful abstraction for the understanding of processes.
Carefully reconsider the simple process implementation scheme of the previous section from the point of view of the individual programs, or tasks, being executed in each process. Do they need to know about their execution context, or about their being repeatedly suspended and restarted by the OS? Of course not, as long as they can rely upon the OS providing them the resources they need. The OS needs context information to perform its job of allocating resources among tasks according to a certain policy, and the application programmers who write the tasks usually don't want (and sometimes must not be allowed) to care about that policy. Moreover, as long as the OS represents faithfully and completely the state of a suspended task in its context, that task can be restarted at any time without it taking notice of the past suspension.
A "ready" or "waiting" process has been loaded into main memory and is awaiting execution on a CPU (to be context switched onto the CPU by the dispatcher, or short-term scheduler). There may be many "ready" processes at any one point of the systems execution - for example, in a one processor system, only one process can be executing at any one time, and all other "concurrently executing" processes will be waiting for execution. Running is a process moves into the running state when it is chosen for execution. The process's instructions are executed by one of the CPUs (or cores) of the system. There is at most one running process per CPU or core.
In the ready state to waiting state, there is no transition between them because you can only send the job in the waiting state if it came from the running state. Also, it will proceed to the waiting state if there are some interrupts and if it needs input/output request. In the waiting state to running state, there is also no transition because the process scheduler selects processes from the ready state for the CPU. Also, all jobs in the waiting list was arranged and prepared to proceed in the ready state. In addition, only the ready jobs or only the jobs in the ready state will proceed to the running state to be run and to bypass the ready state would make process management impossible.


Walang komento:
Mag-post ng isang Komento