<s>
A	O
general	B-Operating_System
protection	I-Operating_System
fault	I-Operating_System
(	O
GPF	O
)	O
in	O
the	O
x86	B-Operating_System
instruction	B-General_Concept
set	I-General_Concept
architectures	I-General_Concept
(	O
ISAs	O
)	O
is	O
a	O
fault	B-Application
(	O
a	O
type	O
of	O
interrupt	B-Application
)	O
initiated	O
by	O
ISA-defined	O
protection	O
mechanisms	O
in	O
response	O
to	O
an	O
access	B-Error_Name
violation	I-Error_Name
caused	O
by	O
some	O
running	O
code	O
,	O
either	O
in	O
the	O
kernel	B-Operating_System
or	O
a	O
user	O
program	O
.	O
</s>
<s>
The	O
mechanism	O
is	O
first	O
described	O
in	O
Intel	O
manuals	O
and	O
datasheets	O
for	O
the	O
Intel	B-General_Concept
80286	I-General_Concept
CPU	O
,	O
which	O
was	O
introduced	O
in	O
1983	O
;	O
it	O
is	O
also	O
described	O
in	O
section	O
9.8.13	O
in	O
the	O
Intel	B-General_Concept
80386	I-General_Concept
programmer	O
's	O
reference	O
manual	O
from	O
1986	O
.	O
</s>
<s>
A	O
general	B-Operating_System
protection	I-Operating_System
fault	I-Operating_System
is	O
implemented	O
as	O
an	O
interrupt	B-Application
(	O
vector	B-General_Concept
number	O
13	O
(	O
0Dh	O
)	O
)	O
.	O
</s>
<s>
Some	O
operating	B-General_Concept
systems	I-General_Concept
may	O
also	O
classify	O
some	O
exceptions	O
not	O
related	O
to	O
access	B-Error_Name
violations	I-Error_Name
,	O
such	O
as	O
illegal	O
opcode	B-Language
exceptions	O
,	O
as	O
general	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
,	O
even	O
though	O
they	O
have	O
nothing	O
to	O
do	O
with	O
memory	B-General_Concept
protection	O
.	O
</s>
<s>
If	O
a	O
CPU	O
detects	O
a	O
protection	O
violation	O
,	O
it	O
stops	O
executing	O
the	O
code	O
and	O
sends	O
a	O
GPF	O
interrupt	B-Application
.	O
</s>
<s>
In	O
most	O
cases	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
removes	O
the	O
failing	O
process	B-Operating_System
from	O
the	O
execution	O
queue	O
,	O
signals	O
the	O
user	O
,	O
and	O
continues	O
executing	O
other	O
processes	O
.	O
</s>
<s>
If	O
,	O
however	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
fails	O
to	O
catch	O
the	O
general	B-Operating_System
protection	I-Operating_System
fault	I-Operating_System
,	O
i.e.	O
</s>
<s>
another	O
protection	O
violation	O
occurs	O
before	O
the	O
operating	B-General_Concept
system	I-General_Concept
returns	O
from	O
the	O
previous	O
GPF	O
interrupt	B-Application
,	O
the	O
CPU	O
signals	O
a	O
double	B-General_Concept
fault	I-General_Concept
,	O
stopping	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
If	O
yet	O
another	O
failure	O
(	O
triple	B-Error_Name
fault	I-Error_Name
)	O
occurs	O
,	O
the	O
CPU	O
is	O
unable	O
to	O
recover	O
;	O
since	O
80286	B-General_Concept
,	O
the	O
CPU	O
enters	O
a	O
special	O
halt	O
state	O
called	O
"	O
Shutdown	O
"	O
,	O
which	O
can	O
only	O
be	O
exited	O
through	O
a	O
hardware	B-Operating_System
reset	I-Operating_System
.	O
</s>
<s>
The	O
IBM	B-Operating_System
PC	I-Operating_System
AT	I-Operating_System
,	O
the	O
first	O
PC-compatible	O
system	O
to	O
contain	O
an	O
80286	B-General_Concept
,	O
has	O
hardware	O
that	O
detects	O
the	O
Shutdown	O
state	O
and	O
automatically	O
resets	O
the	O
CPU	O
when	O
it	O
occurs	O
.	O
</s>
<s>
All	O
descendants	O
of	O
the	O
PC	B-Operating_System
AT	I-Operating_System
do	O
the	O
same	O
,	O
so	O
in	O
a	O
PC	O
,	O
a	O
triple	B-Error_Name
fault	I-Error_Name
causes	O
an	O
immediate	O
system	O
reset	O
.	O
</s>
<s>
In	O
Microsoft	B-Application
Windows	I-Application
,	O
the	O
general	B-Operating_System
protection	I-Operating_System
fault	I-Operating_System
presents	O
with	O
varied	O
language	O
,	O
depending	O
on	O
product	O
version	O
:	O
</s>
<s>
Windows	B-Application
3.1x	I-Application
[	O
Program	O
Name ]	O
caused	O
a	O
General	B-Operating_System
Protection	I-Operating_System
Fault	I-Operating_System
in	O
module	O
[	O
module	O
name ]	O
at	O
[	O
memory	B-General_Concept
address ]	O
.	O
</s>
<s>
This	O
error	B-Error_Name
message	I-Error_Name
(	O
with	O
the	O
same	O
design	O
format	O
)	O
can	O
also	O
appear	O
in	O
later	O
versions	O
(	O
95	O
,	O
98	O
and	O
Me	O
)	O
in	O
rare	O
occasions	O
.	O
</s>
<s>
Windows	O
95Windows	O
98Windows	O
NT	B-Device
4.0	I-Device
This	O
program	O
has	O
performed	O
an	O
illegal	O
operation	O
and	O
will	O
be	O
shut	O
down	O
.	O
</s>
<s>
If	O
the	O
problem	O
persists	O
,	O
contact	O
the	O
program	O
vendor.Sometimes	O
,	O
the	O
error	B-Error_Name
message	I-Error_Name
will	O
also	O
say	O
,	O
"	O
Quit	O
all	O
programs	O
,	O
and	O
then	O
restart	O
your	O
computer.	O
"	O
</s>
<s>
Windows	B-Application
2000	I-Application
[	O
Program	O
Name ]	O
has	O
generated	O
errors	O
and	O
will	O
be	O
closed	O
by	O
Windows	O
.	O
</s>
<s>
Windows	B-Device
Me	I-Device
[	O
Program	O
Name ]	O
has	O
caused	O
an	O
error	O
in	O
[	O
Module	O
Name ]	O
.	O
</s>
<s>
For	O
more	O
information	O
about	O
this	O
error	O
,	O
click	O
here.The	O
error	B-Error_Name
message	I-Error_Name
also	O
offers	O
the	O
option	O
to	O
send	O
error	O
details	O
to	O
Microsoft	O
for	O
analysis	O
.	O
</s>
<s>
Windows	B-Application
Vista	I-Application
and	O
later	O
,	O
excluding	O
Windows	O
10Windows	O
Server	B-Device
2008	I-Device
and	O
later	O
[	O
Program	O
Name ]	O
has	O
stopped	O
working	O
.	O
</s>
<s>
In	O
Unix	B-Application
and	O
Linux	B-Application
,	O
the	O
errors	O
are	O
reported	O
separately	O
(	O
e.g.	O
</s>
<s>
segmentation	B-Error_Name
fault	I-Error_Name
for	O
memory	B-General_Concept
errors	O
)	O
.	O
</s>
<s>
In	O
memory	B-General_Concept
errors	O
,	O
the	O
faulting	O
program	O
accesses	O
memory	B-General_Concept
that	O
it	O
should	O
not	O
access	O
.	O
</s>
<s>
However	O
,	O
many	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
implement	O
their	O
memory	B-General_Concept
access-control	O
schemes	O
via	O
paging	O
instead	O
of	O
segmentation	O
,	O
so	O
it	O
is	O
often	O
the	O
case	O
that	O
invalid	O
memory	B-General_Concept
references	O
in	O
operating	B-General_Concept
systems	I-General_Concept
such	O
as	O
Windows	O
are	O
reported	O
via	O
page	B-General_Concept
faults	I-General_Concept
instead	O
of	O
general	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
.	O
</s>
<s>
Operating	B-General_Concept
systems	I-General_Concept
typically	O
provide	O
an	O
abstraction	O
layer	O
(	O
such	O
as	O
exception	O
handling	O
or	O
signals	O
)	O
that	O
hides	O
whatever	O
internal	O
processor	O
mechanism	O
was	O
used	O
to	O
raise	O
a	O
memory	B-General_Concept
access	O
error	O
from	O
a	O
program	O
,	O
for	O
the	O
purposes	O
of	O
providing	O
a	O
standard	O
interface	O
for	O
handling	O
many	O
different	O
types	O
of	O
processor-generated	O
error	O
conditions	O
.	O
</s>
<s>
In	O
terms	O
of	O
the	O
x86	B-Operating_System
architecture	I-Operating_System
,	O
general	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
are	O
specific	O
to	O
segmentation-based	O
protection	O
when	O
it	O
comes	O
to	O
memory	B-General_Concept
accesses	O
.	O
</s>
<s>
However	O
,	O
general	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
are	O
still	O
used	O
to	O
report	O
other	O
protection	O
violations	O
(	O
aside	O
from	O
memory	B-General_Concept
access	B-Error_Name
violations	I-Error_Name
)	O
when	O
paging	O
is	O
used	O
,	O
such	O
as	O
the	O
use	O
of	O
instructions	O
not	O
accessible	O
from	O
the	O
current	O
privilege	B-Device
level	I-Device
(	O
CPL	O
)	O
.	O
</s>
<s>
While	O
it	O
is	O
theoretically	O
possible	O
for	O
an	O
operating	B-General_Concept
system	I-General_Concept
to	O
utilize	O
both	O
paging	O
and	O
segmentation	O
,	O
for	O
the	O
most	O
part	O
,	O
common	O
operating	B-General_Concept
systems	I-General_Concept
typically	O
rely	O
on	O
paging	O
for	O
the	O
bulk	O
of	O
their	O
memory	B-General_Concept
access	O
control	O
needs	O
.	O
</s>
<s>
There	O
are	O
some	O
things	O
on	O
a	O
computer	O
which	O
are	O
reserved	O
for	O
the	O
exclusive	O
use	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
If	O
a	O
program	O
which	O
is	O
not	O
part	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
attempts	O
to	O
use	O
one	O
of	O
these	O
features	O
,	O
it	O
may	O
cause	O
a	O
general	B-Operating_System
protection	I-Operating_System
fault	I-Operating_System
.	O
</s>
<s>
Additionally	O
,	O
there	O
are	O
storage	O
locations	O
which	O
are	O
reserved	O
both	O
for	O
the	O
operating	B-General_Concept
system	I-General_Concept
and	O
the	O
processor	O
itself	O
.	O
</s>
<s>
General	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
are	O
raised	O
by	O
the	O
processor	O
when	O
a	O
protected	O
instruction	O
is	O
encountered	O
which	O
exceeds	O
the	O
permission	O
level	O
of	O
the	O
currently	O
executing	O
task	O
,	O
either	O
because	O
a	O
user-mode	O
program	O
is	O
attempting	O
a	O
protected	O
instruction	O
,	O
or	O
because	O
the	O
operating	B-General_Concept
system	I-General_Concept
has	O
issued	O
a	O
request	O
which	O
would	O
put	O
the	O
processor	O
into	O
an	O
undefined	O
state	O
.	O
</s>
<s>
General	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
are	O
caught	O
and	O
handled	O
by	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Generally	O
,	O
if	O
the	O
fault	B-Application
originated	O
in	O
a	O
user-mode	O
program	O
,	O
the	O
user-mode	O
program	O
is	O
terminated	O
.	O
</s>
<s>
If	O
,	O
however	O
,	O
the	O
fault	B-Application
originated	O
in	O
a	O
core	O
system	O
driver	O
or	O
the	O
operating	B-General_Concept
system	I-General_Concept
itself	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
usually	O
saves	O
diagnostic	O
information	O
either	O
to	O
a	O
file	O
or	O
to	O
the	O
screen	O
and	O
stops	O
operating	O
.	O
</s>
<s>
It	O
either	O
restarts	O
the	O
computer	O
or	O
displays	O
an	O
error	B-Error_Name
screen	I-Error_Name
,	O
such	O
as	O
a	O
Blue	O
Screen	O
of	O
Death	O
or	O
kernel	B-Operating_System
panic	I-Operating_System
.	O
</s>
<s>
accessing	O
descriptor	O
tables	O
such	O
as	O
the	O
Global	B-General_Concept
Descriptor	I-General_Concept
Table	I-General_Concept
(	O
GDT	O
)	O
,	O
the	O
Interrupt	B-General_Concept
descriptor	I-General_Concept
table	I-General_Concept
(	O
IDT	O
)	O
and	O
the	O
Local	B-General_Concept
Descriptor	I-General_Concept
Table	I-General_Concept
(	O
LDT	O
)	O
.	O
</s>
<s>
Faults	O
can	O
occur	O
in	O
the	O
task	B-Device
state	I-Device
segment	I-Device
(	O
TSS	O
)	O
structure	O
when	O
:	O
</s>
<s>
Other	O
causes	O
of	O
general	B-Operating_System
protection	I-Operating_System
faults	I-Operating_System
are	O
:	O
</s>
<s>
Legacy	O
SSE	B-General_Concept
:	O
Memory	B-General_Concept
operand	O
is	O
not	O
16-byte	O
aligned	O
.	O
</s>
