A process is a program in execution. The execution of a process must progress in a sequential fashion. That is at any time, at most one instruction is executed on behalf of the process.
A program by itself is not a process; a program is a passive entity, whereas a process is an active entity.
As a process executes, it changes state. The state of the process is defined in part by the followings states:
New
- The process is being created.
Ready
- The process is waiting to be assigned to a processor.
Running
- Instructions are being executed.
Waiting
- The process is waiting for an event to occur.
Terminated
- The process has finished execution.
These names are random, and vary between operating systems. However, the state that they represent are found on all systems.
From Ready to Waiting
There is no transition from READY to WAITING because, as defined, when a process is at its READY state, the process is only waiting to be assigned to a processor. And from the word itself, the process is ready for execution. When the process is already in that state, all the events it needs to execute were already executed before it can be placed in the READY STATE. If we are going to put a transition from READY to WAITING, it would only mean that in the first place, the process should not be in the READY state. Because the WAITING state is still waiting for an event to occur, it is still not ready for execution.
From Waiting to Running
When a process is interrupted during in the RUNNING process, it is placed in the WAITING state. Therefore, all process in the WAITING list has interrupts and lacks I/O request. A process cannot be placed in the RUNNING state when it lacks I/O request. And when the I/O requests are complete, the process is being placed in the READY state. Thus, it is impossible to have a transition from WAITING to RUNNING.
No comments:
Post a Comment