Question: Model the states of a process and create a program to predict the next state of a process given the current state input. Take
Model the states of a process and create a program to predict the next state of a process given the current state input. Take into account the interrupts and I/O events. STATES: new, ready, running, waiting, terminated. 1. Ask for current state 2. Model the next states for each state 3. Output the next state. new admitted ready interrupt Current state: ready Next state: running exit running I/O or event completion scheduler dispatch 10 or event wait waiting Sample: Case 1: State Predictor States: new, ready, running, waiting, terminated Current state: waiting 1/0 Completed? (Enter y/n) ===>y Next state: ready Case 2: State Predictor States: new, ready, running, waiting, terminated terminated
Step by Step Solution
3.36 Rating (159 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
