Question

Using any OR one of the referenced website articles, discuss how operating systems switch between processes...

Using any OR one of the referenced website articles, discuss how operating systems switch between processes and how the OS decides to stop one process and start another.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
  • The Operating systems performs the following steps to switch between two processes:-

1.It saves the Program Counter  and user stack pointer of the currently executing process, and transfers control to the kernel clock interrupt handler

.2.The clock interrupt handler saves the rest of the registers, as well as other machine state, such as the state of the floating-point registers, in the process PCB.

3.The OS invokes the scheduler to determine the next process to execute.

4.The OS then retrieves the state of the next process from its Process Control Block, and restores the registers. This restore operation takes the processor back to the state in which this process was previously interrupted, executing in user code with user mode privileges.

  • Through CPU Scheduling Operating system decides when to stop one process and start another. This is done due to unavailability of any resource like IO devices,memory etc. which a processes requires for it's execution thus preventing the CPU to remain idle.

Add a comment
Know the answer?
Add Answer to:
Using any OR one of the referenced website articles, discuss how operating systems switch between processes...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT