<s>
The	O
interrupt	B-Operating_System
priority	I-Operating_System
level	I-Operating_System
(	O
IPL	O
)	O
is	O
a	O
part	O
of	O
the	O
current	O
system	O
interrupt	B-Application
state	O
,	O
which	O
indicates	O
the	O
interrupt	B-General_Concept
requests	I-General_Concept
that	O
will	O
currently	O
be	O
accepted	O
.	O
</s>
<s>
An	O
integer	O
based	O
IPL	O
may	O
be	O
as	O
small	O
as	O
a	O
single	O
bit	O
,	O
with	O
just	O
two	O
values	O
:	O
0	O
(	O
all	O
interrupts	B-Application
enabled	O
)	O
or	O
1	O
(	O
all	O
interrupts	B-Application
disabled	O
)	O
,	O
as	O
in	O
the	O
MOS	B-General_Concept
Technology	I-General_Concept
6502	I-General_Concept
.	O
</s>
<s>
However	O
,	O
some	O
architectures	O
permit	O
a	O
greater	O
range	O
of	O
values	O
,	O
where	O
each	O
value	O
enables	O
interrupt	B-General_Concept
requests	I-General_Concept
that	O
specify	O
a	O
higher	O
level	O
,	O
while	O
blocking	O
ones	O
from	O
the	O
same	O
or	O
lower	O
level	O
.	O
</s>
<s>
Assigning	O
different	O
priorities	O
to	O
interrupt	B-General_Concept
requests	I-General_Concept
can	O
be	O
useful	O
in	O
trying	O
to	O
balance	O
system	O
throughput	O
versus	O
interrupt	B-Application
latency	O
:	O
some	O
kinds	O
of	O
interrupts	B-Application
need	O
to	O
be	O
responded	O
to	O
more	O
quickly	O
than	O
others	O
,	O
but	O
the	O
amount	O
of	O
processing	O
might	O
not	O
be	O
large	O
,	O
so	O
it	O
makes	O
sense	O
to	O
assign	O
a	O
higher	O
priority	O
to	O
that	O
kind	O
of	O
interrupt	B-Application
.	O
</s>
<s>
Control	O
of	O
interrupt	B-Application
level	O
was	O
also	O
used	O
to	O
synchronize	O
access	O
to	O
kernel	O
data	O
structures	O
.	O
</s>
<s>
Thus	O
,	O
the	O
level-3	O
scheduler	O
interrupt	B-Application
handler	O
would	O
temporarily	O
raise	O
IPL	O
to	O
7	O
before	O
accessing	O
any	O
actual	O
scheduler	O
data	O
structures	O
,	O
then	O
lower	O
back	O
to	O
3	O
before	O
actually	O
switching	O
process	O
contexts	O
.	O
</s>
<s>
However	O
,	O
it	O
was	O
not	O
allowed	O
for	O
an	O
interrupt	B-Application
handler	O
to	O
lower	O
IPL	O
below	O
that	O
at	O
which	O
it	O
was	O
entered	O
,	O
since	O
to	O
do	O
so	O
could	O
destroy	O
the	O
integrity	O
of	O
the	O
synchronization	O
system	O
.	O
</s>
<s>
Of	O
course	O
,	O
multiprocessor	B-Operating_System
systems	O
add	O
their	O
own	O
complications	O
,	O
which	O
are	O
not	O
addressed	O
here	O
.	O
</s>
<s>
Regardless	O
of	O
what	O
the	O
hardware	O
might	O
support	O
,	O
typical	O
UNIX-type	O
systems	O
only	O
make	O
use	O
of	O
two	O
levels	O
:	O
the	O
minimum	O
(	O
all	O
interrupts	B-Application
disabled	O
)	O
and	O
the	O
maximum	O
(	O
all	O
interrupts	B-Application
enabled	O
)	O
.	O
</s>
<s>
As	O
an	O
example	O
of	O
one	O
of	O
the	O
more	O
elaborate	O
IPL-handling	O
systems	O
ever	O
deployed	O
,	O
the	O
VAX	B-Device
computer	O
and	O
associated	O
VMS	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
supports	O
32	O
priority	O
levels	O
,	O
from	O
0	O
to	O
31	O
.	O
</s>
<s>
Priorities	O
16	O
and	O
above	O
are	O
for	O
requests	O
from	O
external	O
hardware	O
,	O
while	O
values	O
below	O
16	O
are	O
available	O
for	O
software	O
interrupts	B-Application
(	O
used	O
internally	O
by	O
the	O
operating	O
system	O
to	O
schedule	O
its	O
own	O
activities	O
)	O
.	O
</s>
<s>
level	O
31	O
is	O
for	O
the	O
"	O
power-fail	O
"	O
interrupt	B-Application
.	O
</s>
<s>
level	O
24	O
is	O
for	O
the	O
clock	O
interrupt	B-Application
.	O
</s>
<s>
Note	O
this	O
is	O
a	O
higher	O
priority	O
than	O
I/O	O
interrupts	B-Application
.	O
</s>
<s>
levels	O
8-11	O
are	O
used	O
for	O
fork	O
interrupts	B-Application
.	O
</s>
<s>
When	O
a	O
driver	O
receives	O
a	O
device	O
interrupt	B-Application
(	O
priority	O
20-23	O
)	O
,	O
it	O
is	O
supposed	O
to	O
do	O
as	O
little	O
processing	O
as	O
possible	O
at	O
such	O
a	O
high	O
priority	O
;	O
instead	O
,	O
if	O
any	O
time-consuming	O
operations	O
need	O
to	O
be	O
done	O
,	O
these	O
are	O
to	O
be	O
deferred	O
by	O
requesting	O
a	O
software	O
interrupt	B-Application
in	O
the	O
8-11	O
range	O
;	O
when	O
this	O
interrupt	B-Application
is	O
triggered	O
,	O
the	O
further	O
processing	O
will	O
resume	O
.	O
</s>
<s>
Similar	O
to	O
this	O
are	O
"	O
bottom	O
halves	O
"	O
and	O
their	O
successors	O
in	O
the	O
Linux	B-Application
kernel	O
.	O
</s>
<s>
level	O
4	O
is	O
used	O
for	O
I/O	O
post-processing	O
tasks	O
—	O
that	O
is	O
,	O
final	O
completion	O
of	O
a	O
QIO	B-Operating_System
request	O
including	O
returning	O
results	O
to	O
the	O
application	O
process	O
.	O
</s>
<s>
level	O
3	O
is	O
used	O
for	O
the	O
process	O
rescheduling	O
interrupt	B-Application
.	O
</s>
<s>
Any	O
code	O
executing	O
at	O
higher	O
interrupt	B-Application
levels	O
is	O
not	O
allowed	O
to	O
assume	O
that	O
there	O
was	O
a	O
current	O
process	O
context	O
(	O
since	O
a	O
process	O
reschedule	O
might	O
be	O
in	O
progress	O
)	O
.	O
</s>
<s>
In	O
particular	O
,	O
page	B-General_Concept
faults	I-General_Concept
are	O
not	O
allowed	O
at	O
this	O
or	O
higher	O
levels	O
.	O
</s>
<s>
Any	O
time	O
the	O
kernel	O
needs	O
access	O
to	O
a	O
process	O
context	O
,	O
it	O
sends	O
that	O
process	O
a	O
special	O
kernel	O
AST	B-Operating_System
which	O
executes	O
in	O
the	O
process	O
context	O
at	O
IPL	O
2	O
.	O
</s>
<s>
level	O
0	O
is	O
the	O
normal	O
level	O
for	O
execution	O
of	O
non-interrupt	O
code	O
,	O
including	O
ordinary	O
application	O
code	O
.	O
</s>
<s>
Alpha	B-Device
hardware	O
contains	O
native	O
support	O
for	O
IPLs	O
.	O
</s>
<s>
When	O
OpenVMS	B-Operating_System
was	O
ported	O
to	O
Itanium	B-General_Concept
in	O
2001	O
,	O
the	O
IPL	O
scheme	O
was	O
simulated	O
using	O
features	O
provided	O
by	O
the	O
Itanium	B-General_Concept
hardware	O
.	O
</s>
