Suppose that an operating system had the following six states: State Description Running Currently using the CPU
Question:
- Suppose that an operating system had the following six states:
State | Description |
Running | Currently using the CPU |
Ready | Waiting for the CPU |
Blocked for Interrupt | Waiting for an interrupt handler to finish, then resume running |
Blocked for a resource | Waiting for a resource to be allocated, then will become ready |
Suspended | Moved to secondary storage from ready |
Created | Process is newly created |
Terminated | Process no longer exists |
Draw a state diagram to represent a process with these states. Make sure to label state transitions.
- The table below illustrates a process model of a person, in which there are only two states: sleeping and waking. The states of this process model are as follows:
Waking | Person is doing all other daily activities |
Sleeping | Actively sleeping |
The transitions between the two states of a person are:
Waking-> Sleeping ( Person is tired and lays down to sleep)
Sleeping -> Waking (Alarm clock goes off and wakes the person from sleep)
- Add four more states to the diagram (for example, eating or studying)
- Draw all of the possible transitions among the six states in your state diagram.
Operating Systems Internals and Design Principles
ISBN: 978-0133805918
8th edition
Authors: William Stallings