Question

In: Computer Science

Describe the difference between pre-emptive and non-pre-emptive scheduling algorithms. Which one is more suitable for a...

Describe the difference between pre-emptive and non-pre-emptive scheduling algorithms. Which one is more suitable for a time sharing system and why?

Solutions

Expert Solution

PRE-EMPTIVE SCHEDULING:

In the pre-emptive scheduling, a process is interrupted while it is in the running state and a higher priority process is assigned in place of it. The scheduler puts the running process from the running state to the ready state. Sometimes if a higher priority process comes from the waiting state to a ready state then also preemption occurs. In pre-emptive scheduling, there is an overhead of switching the processes in-between known as context switching. Some of the examples of pre-emptive scheduling are shortest job first(SJF) preemptive, Round Robin(RR), etc.

NON-PRE-EMPTIVE SCHEDULING:

In non-pre-emptive scheduling, a process is not interrupted when it is in the running state and it is only switched with another process if it has terminated or has come to waiting state to perform some I/O operations. Hence, there is no overhead of context switching in this case. Some of the examples of non-pre-emptive scheduling are First Come First Serve(FCFS), shortest job first(SJF) non-preemptive, etc.

Obviously, pre-emptive scheduling is suitable for time-sharing as a process needs to be preempted in its running state whenever its allocated time has been completed and next process should be allocated to the CPU just like Round Robin scheduling algorithm.


Related Solutions

Between Gartner's Hype Cycle and the technology S-Curve, Which one is better or more suitable for...
Between Gartner's Hype Cycle and the technology S-Curve, Which one is better or more suitable for your use? Why?
Which of these is a difference between DNA and RNA? There is more than one correct...
Which of these is a difference between DNA and RNA? There is more than one correct answer. Group of answer choices -DNA is usually single-stranded while RNA is usually double-stranded. -The deoxyribose in DNA lacks an O atom, while the ribose in RNA has an O atom. -DNA has T while RNA has U. -The deoxyribose in DNA has an O atom, while the ribose in RNA lacks an O atom. -DNA has U while RNA has T. -You can...
Explain the difference between non-disjunction during Meiosis I and Meiosis II. Which is more detrimental to...
Explain the difference between non-disjunction during Meiosis I and Meiosis II. Which is more detrimental to the genetic compositionof the gametes? Explain your answer
Describe the primary difference between consequentialist and non-consequentialist approaches to ethics. Choose one of the major...
Describe the primary difference between consequentialist and non-consequentialist approaches to ethics. Choose one of the major theories associated with consequentialism: what objections might be made to this theory? Choose one of the major theories associated with non-consequentialism: what objections might be made to this theory?
Describe the difference between threshold and non-threshold dose response curves. Give one example of a disease...
Describe the difference between threshold and non-threshold dose response curves. Give one example of a disease or condition that fall into each category. (2 points)
What is the difference between "accounting profit" and "economic profit?" Which one is more important for...
What is the difference between "accounting profit" and "economic profit?" Which one is more important for determining whether to operate or close down a business that you own?
If TIG, MIG and arc welding are in consideration, which one is more suitable for robotic...
If TIG, MIG and arc welding are in consideration, which one is more suitable for robotic (automatic) welding? Why?
1- Which of the following scheduling algorithms could result in starvation? Why? If any, show how...
1- Which of the following scheduling algorithms could result in starvation? Why? If any, show how can starvation problem be resolved.a. First-come, first-served (FCFS)b. Shortest job first (SJF)c. Round robin (RR)d. Priority?2- Illustrate Peterson solution to critical section problem, showing how it satisfy the conditions of mutual exclusion, progress, and bounded waiting!3- What is the meaning of the term busy waiting? What other kinds of waiting are there in an operating system? Can busy waiting be avoided altogether? Explain your...
What is the difference between treadmill energy and overground energy? Which one is more cost effective...
What is the difference between treadmill energy and overground energy? Which one is more cost effective and why? Explain the forces applied. Which source is using less force and why? How can you approximate the energy cost by gravitational energy? lost or gained? Why is there not a net change for the treadmill at an incline? What happens to the magnitude and direction of both energy sources?
Discuss the difference between book values and market values and explain which one is more important...
Discuss the difference between book values and market values and explain which one is more important to the financial manager and why.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT