Question

In: Computer Science

Provide a reason for each process state transition below: a) Ready -> Running: b) Running ->...

Provide a reason for each process state transition below:
a) Ready -> Running:
b) Running -> Ready:
c) Running -> Blocked:
d) Blocked -> Ready:

Solutions

Expert Solution

Process:

A process is not only a program under execution but it is the active state of the program when it is executing and it has its own Process Control Block.

A process requires other resources like memory, CPU, hard disk, and Input/Output, etc.

A process has five states as given below:

  1. New
  2. Ready
  3. Running or Executing
  4. Waiting or blocked
  5. Terminated

New:

The new state of a process means, the process is just created and it is stored onto the hard disk. This process will be picked by the operating system into the main memory.

The new state is the initial state.

Ready:

The ready state of a process means the process is waiting for the CPU to be assigned. The new state processes are picked from the secondary memory by the operating system and put into the main memory.

The short term scheduler selects the process from the ready queue.

Executing:

The executing state of a process means the process is running and CPU is allocated to this process to complete the required action done by this process.

Waiting or Blocked:

The waiting state is a state in which the process is waiting for some resources that may behold by the other process. If the process gets the required resources then it will go into the ready state for further execution.

Terminated:

This is the last state of a process in which the process will terminate and the life cycle of that process will end with this state.

a) Ready -> Running:

When a process is in a ready state then it is waiting for the CPU to execute but maybe the CPU is executing some other process. When the CPU will allocate a process the process state will change from ready to running.

b) Running -> Ready:

When the CPU will allocate a process the process state will change from ready to running. But if a process having high priority entry into the system and preemptive scheduling is used then the current running process will move to the ready queue and the CPU will allocate to high priority process.

c) Running -> Blocked:

The blocked state is a state in which the process is waiting for some resources that may behold by the other process. If the running process required some resource that is not free at that time then the running process will be blocked until the required resource is not free.


d) Blocked -> Ready:

If the running process required some resource that is not free at that time then the running process will be blocked until the required resource is not free. The process state changed to the ready state when the process get the required resource and it is ready to execute.


Related Solutions

As a process executes, it changes states. Explain what are ready state, running state, and waiting...
As a process executes, it changes states. Explain what are ready state, running state, and waiting state. Also, describe when a process moves between these three states
Consider the market for wheat. For each of the cases below state with a reason whether...
Consider the market for wheat. For each of the cases below state with a reason whether demand and/or supply would change and what would happen to the equilibrium price and quantity of wheat as a result. Fully explain your decision including any assumptions you make. You do NOT need to draw diagrams for this question but fully explain your answers                                                                                                     1.        A fall in the price of corn 2.        A fall in the price of sugar 3.        An...
Consider the market for wheat. For each of the cases below state with a reason whether...
Consider the market for wheat. For each of the cases below state with a reason whether demand and/or supply would change and what would happen to the equilibrium price and quantity of wheat as a result. Fully explain your decision including any assumptions you make. You do NOT need to draw diagrams for this question but fully explain your answers 1. A fall in the price of corn 2. A fall in the price of sugar 3. An expected lowering...
Consider the market for wheat. For each of the cases below state with a reason whether...
Consider the market for wheat. For each of the cases below state with a reason whether demand and/or supply would change and what would happen to the equilibrium price and quantity of wheat as a result. Fully explain your decision including any assumptions you make. You do NOT need to draw diagrams for this question but fully explain your answers 1. A fall in the price of corn 2. A fall in the price of sugar 3. An expected lowering...
Consider the market for wheat. For each of the cases below state with a reason whether...
Consider the market for wheat. For each of the cases below state with a reason whether demand and/or supply would change and what would happen to the equilibrium price and quantity of wheat as a result. Fully explain your decision including any assumptions you make. You do NOT need to draw diagrams for this question but fully explain your answers                                                                                                     1.        A fall in the price of corn 2.        A fall in the price of sugar 3.        An...
Consider the market for wheat. For each of the cases below state with a reason whether...
Consider the market for wheat. For each of the cases below state with a reason whether demand and/or supply would change and what would happen to the equilibrium price and quantity of wheat as a result. Fully explain your decision including any assumptions you make. You do NOT need to draw diagrams for this question but fully explain your answers 1. A fall in the price of corn 2. A fall in the price of sugar 3. An expected lowering...
Network Security: A process can be in one of three states: running, ready, and blocked. A...
Network Security: A process can be in one of three states: running, ready, and blocked. A job is a kind of process and can be in one of three states: foreground, background, and paused. What’s the similarity between the three process states and the three job states? Hint: It’s not a one-to-one mapping.
For each of the scenarios below: a) state why evolution is occurring b) state whether mutation,...
For each of the scenarios below: a) state why evolution is occurring b) state whether mutation, natural selection, genetic drift or gene flow appears to be the mechanism of evolution c) and describe why you picked a particular mechanism of evolution Scenario 1: Researchers have been studying an isolated, small population of wolves (fewer than 30 individuals) on Isle Royale in Lake Superior for the past 30 years. This year they find that there are only 16 individuals left in...
Consider real time process for the following 3 process with the period and running time below:...
Consider real time process for the following 3 process with the period and running time below: Process Period Running time 1 80 40 2 60 25 3 39 15 Show that Rate Monotonic Scheduling will fail to schedule the 3 processes to satisfy their requirements. b. Suppose you can change the period that process 1 will take to run. What is the minimum value such that Rate Monotonic Scheduling will work? Explain your answer
1. a. Explain in details why the Operating System switches the process from Running state to...
1. a. Explain in details why the Operating System switches the process from Running state to Waiting state when it issues any I/O operation.    b. Describe a situation where the Operating System switches the process from the Running state to Ready state.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT