最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

linux - In a multilevel queue scheduler, will higher priority processes preempt already-running lower priority ones? - Stack Ove

matteradmin9PV0评论

Lets say we have two queues: priority 1 with Round Robin and priority 2 with Shortest Remaining Time First.

At time 0, process A with a 10 units CPU burst is in SRTF queue. It starts excecuting, and at time 2, process B with 12 units CPU burst arrives at RR queue.

When process B arrives at RR, it is a higher priority process than the currently executing process A. Does the scheduler let process A run its remaining burst, or does it preempt it to run process B?

Silberchaltz's Operating Systems Concepts states that "A process that arrives in queue 1 will preempt a process in queue 2" but I don't clearly understand if it means it can preempt a process in the middle of execution or only if it's sitting in the queue.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far