[Autogenerated] what is the Colonel scheduler really the kind of
schedule works in two unrelated accessor to speak.
One of them is using a timer so the timer wakes up the scheduler every so
and so often we'll discuss what so and so often means in the next slide
and this is used to check whether the current running thread on a
processor has exhausted its its quantum.
So how can the schedule know that it has to wake up every so often
and check the time the thread was running on that processor and of
course the schedule has to wake up on every process or to see
whatever is happening on that processor,
whether the threat that is running on that processor has exhausted its
quantum and so we'll see that the default time that it uses the default
interval is roughly 15.6 milliseconds but I have a few more things to
say about that in the next slide.
Now the other access the schedule works at or along if
you will is when certain events happen, when certain events happen.
The schedule has to be invoked saying, hey,
mr scheduler something happened here is the thing that happened.
What do you think about that?
Does anything have to change?
For example, there is an I.
O completion so some eye operation is completed.
It means that the threat that was waiting for that operation now has to go from
the waiting state to the ready state and so that might need,
that might require changing something because maybe that threat has a
high priority and you might need to preempt another threat that is
currently running on on some processor if a threat changes priority for
hire or loper doesn't really matter.
This could mandate a change in scheduling state,
same goes for the case when the weight will object state changes.
For example, if I set an event object then threats,
waiting on that event object now have to wake up,
which means again the schedule might need to do any some kind
of changes if a thread voluntarily enters the wage state or
called sleep or something like that,
then obviously the thread says I don't want to run at this point.
So now the processor is free to perhaps run a different thread and
so the schedule has to see whether there's another threat that is
waiting to run in the ready state,
wants to get the processor and give that processor to that threat.
So essentially the scheduler is just a bunch of functions that
that work in these two unrelated access.
One of them is based on the timer and the other one is
based on things that happen essentially,
certain API is being called really