Question

In: Computer Science

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

Solutions

Expert Solution

Sol:

A process is a instance of a computer program that is being executed by one or many threads. It contains the program code and its activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently. A process may goes through different states during its execution. various events can cause a process to change its states.

A process may be in one of the following states.

Ready state

- The process is waiting to be assigned to a processor.

- Ready processes are waiting to have the processor allocated to them by the operating system so they can run. process may come into this state after start state or while running it by but interrupted by the scheduler to assign CPU to some other process.

Running state

- Instructions are being executed in this state.

- A process which is executing its instructions with the help of CPU is called in running state.

- Only one process can be in this state at a time, if there is one CPU present in system(uniprocessor).

Waiting state

A process waiting for completion of I/O or waiting for an event to occur is called in waiting state. there can be many suspended process at a time.

how a process moves between these three states

After a process is created it is admitted and it comes to the ready state. In the ready state the process is been ready to execution and its waiting to be assigned a processor so that it can begin its execution. In the ready state the scheduler dispatches it to the processor and then when it begins its execution it is in the running state, so when it is dispatched and when it receives the processor it begins its execution and when it is executing or when the instructions in the process is been executed at that moment we say that it is in the running state.


Related Solutions

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:
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.
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.
Explain the economic changes in northern states of the United States in the early 1800s. How...
Explain the economic changes in northern states of the United States in the early 1800s. How did industrialization, urbanization, the market revolution, and the transportation revolution change America? What were its effects on society and culture?
Explain why the United States is a nation-state and why the state of Minnesota is not....
Explain why the United States is a nation-state and why the state of Minnesota is not. What changes would be necessary for the state of Minnesota to become a nation and a state?
What changes are seen in the amino acids when hemoglobin changes its state from t state...
What changes are seen in the amino acids when hemoglobin changes its state from t state to r state? Explain all tge interactions of the subunits.
What does it mean when it is said that the United States is running a trade...
What does it mean when it is said that the United States is running a trade deficit? What impact will a trade deficit have on interest rates?
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
Urgent!! What is the waiting time and Turnaround time of each process for each of the...
Urgent!! What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2...
What is the waiting time and Turnaround time of each process for each of the scheduling...
What is the waiting time and Turnaround time of each process for each of the scheduling algorithms? [12 Marks] Job Arrival Time Burst(msec) Priority A 0 6 3 (Silver) B 1 2 1 (Diamond) C 3 5 3 (Silver) D 5 3 4 (Bronze) E 7 2 2 (Gold) (a) First-Come-First-Served (FCFS) scheduling [2 Marks] (b) Preemptive PRIORITY scheduling [2 Marks] (c) Highest Response Ratio Next (HRRN) scheduling [2 Marks] (d) Round Robin (RR) (quantum = 4) scheduling [2 Marks]...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT