HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

CPU scheduling Decisions

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
decisionscpuscheduling

Problem

Operating System - CPU scheduling Decisions

The question above talks about why CPU scheduling does not take place when ready to running.

But I wonder why CPU scheduling does not take place when new to ready. I think it is similar to the process of waiting to ready. They both add processes to ready without changing processes that are running.

Solution

When you put a new process in the ready queue, you are just adding the process, not changing anything to running as a result. With a non-preemptive scheduler this is also the case for waiting to ready. But, when you have a preemptive scheduler, tasks that come from waiting to ready get a higher priority than newly running tasks, so that "scheduler decision-making" is determining the priority of this newly ready task in the queue. It looks like they get a higher priority than new tasks because they've already been delayed enough waiting for IO.

Context

StackExchange Computer Science Q#138827, answer score: 2

Revisions (0)

No revisions yet.