589 views
0 votes
0 votes
does the job scheduler only select the process or bring the process from new state to ready state

1 Answer

0 votes
0 votes

@Anmol1512

A process is an active program. It can also be said as a program that is under execution. It is more than the program code as it includes the program counter, process stack, registers, program code etc...

Compared to this, the program code is only the text section.

A process passes through different states as it executes. These states may be different in different operating systems.

However, the common process states are explained below with the help of a diagram −

New (Create) –

In this step, the process is about to be created but not yet created, it is the program which is present in secondary memory that will be picked up by OS to create the process...

Ready –

New -> Ready to run. After the creation of a process, the process enters the ready state i.e. the process is loaded into the main memory...

The process here is ready to run and is waiting to get the CPU time for its execution. Processes that are ready for execution by the CPU are maintained in a queue for ready processes...

A "ready" or "waiting" process has been loaded into main memory and is awaiting execution on a CPU (to be context switched onto the CPU by the dispatcher, or short-term scheduler)...

There may be many "ready" processes at any one point of the system's execution—for example, in a one-processor system, only one process can be executing at any one time, and all other "concurrently executing" processes will be waiting for execution....

A ready queue or run queue is used in computer scheduling. Modern computers are capable of running many different programs or processes at the same time.

However, the CPU is only capable of handling one process at a time. Processes that are ready for the CPU are kept in a queue for "ready" processes…

Other processes that are waiting for an event to occur, such as loading information from a hard drive or waiting on an internet connection, are not in the ready queue....

 

Run –

The process is chosen by CPU for execution and the instructions within the process are executed by any one of the available CPU cores...

Blocked or wait –

Whenever the process requests access to I/O or needs input from the user or needs access to a critical region(the lock for which is already acquired) it enters the blocked or wait state.

The process continues to wait in the main memory and does not require CPU. Once the I/O operation is completed the process goes to the ready state...

 

Terminated or completed –

Process is killed as well as PCB is deleted...

Suspend ready –

Process that was initially in the ready state but were swapped out of main memory(refer Virtual Memory topic) and placed onto external storage by scheduler are said to be in suspend ready state…

The process will transition back to ready state whenever the process is again brought onto the main memory...

 

Suspend wait or suspend blocked –

Similar to suspend ready but uses the process which was performing I/O operation and lack of main memory caused them to move to secondary memory…

When work is finished it may go to suspend ready….

 

1. https://gateoverflow.in/134665/Which-scheduler-work-while-moving-process-running-state-state 

 

2. https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/3_Processes.html 

 

3. https://gateoverflow.in/243167/Self-doubt 

 

4. https://en.wikipedia.org/wiki/Process_state#Ready

 

 

Related questions

1 votes
1 votes
2 answers
1