in Operating System edited by
2,566 views
0 votes
0 votes

Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; thisinvolves

1 switching context

2.jumping to the proper location in the user program to restart that program

3 switching to user mode

4. All the above

ANSWER IS D
I AM NOT GETTING 2 AND 3

in Operating System edited by
2.6k views

1 Answer

3 votes
3 votes
Best answer

Dispatcher is a special program which comes into play after scheduler. When scheduler completed its job of selecting a process, then after it is the dispatcher which takes that process to the desired state/queue. The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler. This function involves the following:

  • Switching context
  • Switching to user mode
  • Jumping to proper location in user program to restart that program

As we are now dealing with the another process and earlier the short term scheduler was involved i.e the control was with the CPU so in order to execute the process the control must now be given to the user So it makes 2 correct.(For instance If it continues to execute in the priviliged mode how will the user interactive processes work?)

Maybe that process was  preemptied or It is started so we have to jump to the proper location in order to restart the working of the program . So this also needs to be taken care of by the dispatcher.

selected by

4 Comments

@Anjali means the cpu scheduling is done in privileged mode and whenever the new process comes then context switch takes place from kernel mode to user mode then that process scheduled by STS by again context switching in kernel mode from user mode

is it so , please correct me if i am wrong
1
1
0
0

@anjali007 let one process is running state and now if the time quantum of the process has completed, till now everything was going in user mode . Now privileged mode will start  as the cpu scheduling decision need to be taken  .Afterthe process is selected by the cpu scheduler , We need to save the context of the process  which is done by the dispatcher and assigning the selected process to the  cpu. Now the privilege mode ends and user mode starts.

is this the right conclusion?

 

 

 

0
0

Related questions