[Autogenerated] What are the actual R Q levels we're talking about here.
What do they mean do We have some special values.
That we need to look at.
So let's look at the values.
That we have for R Q L S, the most common value for an R Q L for a processor,
is zero, is also called passive level, in the Windows driver key documentation.
This is the normal way of working.
It's very difficult.
To explain what normal is without discussing the other level.
So we'll go with the other levels.
First and then normal would be much better.
Understood.
Now, if you've looked at user more documentation,
you probably have never seen the term R Q L defined ever.
And The reason is that in user mode When user mode
code is running on some processor, the processor's R Q L must be zero.
Nothing else.
Is valid.
Nothing else can work.
And That's why in user mode the R Q L term is never defined.
There's no point in defining it.
If it's always zero, always has the same value.
And There's no way.
To change it.
Only in kernel mode R Q L, can be above zero.
Even though most of the time it is still zero.
So let's delay our discussion of R Q L zero.
A little bit Once we get to the end of this slide,
the next value which is available in our I Q L S its called a PC level,
an a PCs short for a synchronous procedure,
call this is a kernel object representing a call back,
that can be attached, to a particular thread.
So,
that that particular thread will run that code We'll discuss a PCs in
greater detail later on in the This course for now.
I will just say that special kernel app CSS run at this level.
So we'll defer that discussion as well.
To Later when we look at a PCs and then We'll be
able to fill in a little bit of a gap, that I'm going to leave here,
in the slide, the next level, to look at which is a very important level,
is known as dispatch level, sometimes D PC level,
and has the value of two This is where the world changes
if a thread running on the processor.
That currently has an article of zero decides, to raise are ee to two or higher.
Several things.
Are happening at that point there,
is no scheduler that can wake up on that processor,
and This means there's no context switching allowed,
which means that This current thread can run theoretically indefinitely there,
is no limited time slice or quantum for that thread right now.
While the R Q of the processor.
Is two or higher,
you can think of that as the scheduler having to wake up on a processor,
and that Waking up happens at R Q,
two So if the currently executing code is already at article Q two or higher,
it means the scheduler cannot wake up on that processor.
It can still wake up on other processors by the way,
remember, that the the R Q L is on a processor basis.
Its not a system wide property.
Every processor has its own R Q L.
And If one has an R Q of two another one can have an idea co of zero,
and That's perfectly normal because there is no context switching
because there is no scheduler a few more things,
are not allowed such as waiting, waiting,
is not allowed calling a waiting.
API calls a blue screen.
Immediately the only thing, that is allowed in disrespect,
is waiting with a time out of zero,
which essentially means I don't really want to Wait,
I just want to check the status or the state of the particular object.
I'm looking at and Also accessing page memory,
is not allowed if you try to access page memory again,
your blue screen, the system, and the reason,
is that in order for a page four to be properly handled.
You might need to perform io operations,
an our operations require context switch for other three to do stuff,
and So, that is not allowed.
And your blue screen the system again.
So we have some very significant limitations on link real
two our higher and this is of course, intentional.
Otherwise there will be no motivation.
To to downgrade, arc L back, to something below level number two.
So level number two, is very important.
And We'll talk about that in more detail.
Later on looking at the next set of levels,
we have a set from 3 to 11 knownn as device R Q L S,
these are RQ, LS,
that are supposed to be used by normal devices such as this and network cards,
and so on.
So,
these are the priorities essentially that these inter apps will receive notice.
That these numbers,
are always above two It means that the rules for for these
internet up service routines when they're running are the
same as the rules for our Q, two which means no contact switches,
are allowed no waiting.
Is allowed you cannot access page memory,
and your access you need to know upfront,
that this memory, is definitely in physical memory right now.
And there, are ways, to know, these kinds of things,
especially when we're considering a bit more What the
typical internet up service routine does which will discuss
a bit later in this module Next,
we have a bunch of levels which are not uh mostly are not documented.
So won't be discussing them in any uh detail.
However,
we have the highest possible level called high level which has the value of 15.
And If the C P S R Q L, is at 15,
nothing can interfere with that code not even an interrupt because an interrupt,
is limited,
to R Q L 11 or the other R Q L S which are used for some
special interrupts like the clock interrupt.
So this is the same as mating off all interrupts.
So obviously, if you put the CPU in Article 15, nothing can interfere.
That code Until further notice until the article L drops back.
To something lower.
And even then only interrupt can interrupt technically unless
you drop the article below two which would cause the scheduler
to wake up on that processor,
and be able to make scheduling changes like schedule,
a different thread.
So this is the set of levels for our R Q L S.
You might be wondering where do threat priorities come in.
We discussed third priorities in previous courses.
How do threat priorities?
Connect with our Q L s if at all.
So based on the previous discussion, we know that thread priorities.
Only make sense.
That R Q, is zero or one.
Because if the R Q L, is two for a particular processor,
whatever thread, was running at that point has an infinite quantum.
So its priority doesn't really matter.
More priorities.
Only make sense with the R Q L of a processor,
are below two where the scheduler can wake up.
And make schedule changes.
And In fact, most of the time processors have an RQL of 0,
but not all of the time.