in Operating System
2,293 views
1 vote
1 vote
Which Scheduler work while moving a process from Running state to Wait State ?
in Operating System
2.3k views

4 Comments

Only One process is running at a time And whenever it require input / output operation it can do if resources are free. So it can go to waiting state. I don't think we require any scheduler here.

But when a process goes from running state to waiting state. We require another process to run. So we can select any one from the ready state. Here we need short term scheduler.
4
4
@Hemant,

 It is the job of Mid term scheduler to bring a process in running state to waiting state.

If no process is in Ready State, then ST scheduler will not pick any process to bring it to running state, please correct me if iam wrong.
0
0
edited by
@Anil, Job of the mid-term scheduler is when a new (important) process want to come from the secondary memory to main memory, but there is no space in main memory. Then Mid-term scheduler picks a process from waiting state and put it into the secondary memory for short time. He picks the process from the waiting state because these processes are doing input/output work and can't be assigned to the processor. So it is best to pick them. Once there is enough space back in the main memory. These processes will come back to main memory.
0
0
@Hemant,

 Yes you  are correct, Midterm scheduler deals with moving of process between Main Memory and Secondary Memory. Since Wait/Block state process will be still in Main Memory and the Short term Scheduler is responsible for moving a process from Running state to Wait State.
0
0

2 Answers

1 vote
1 vote
Reference: William Stallings Operating System
 
The short-term scheduler is invoked whenever an event occurs that may lead to
the blocking of the current process, or that may provide an opportunity to preempt
a currently running process in favor of another. Examples of such events include:
Clock interrupts
I/O interrupts
Operating system calls
Signals (e.g., semaphores)
 
edited by
0 votes
0 votes
I think.. Short term schedular..

4 Comments

I think there is no need of Scheduler but it is work of interrupt.
1
1
It's medium time scheduler...
0
0
@Madhusmita,

It is the job of short term scheduler.
0
0

Related questions