<s>
In	O
computing	O
,	O
the	O
process	B-Operating_System
identifier	I-Operating_System
(	O
a.k.a.	O
</s>
<s>
process	B-Operating_System
ID	I-Operating_System
or	O
PID	O
)	O
is	O
a	O
number	O
used	O
by	O
most	O
operating	B-Operating_System
system	I-Operating_System
kernels	I-Operating_System
—	O
such	O
as	O
those	O
of	O
Unix	B-Application
,	O
macOS	B-Application
and	O
Windows	O
—	O
to	O
uniquely	O
identify	O
an	O
active	O
process	B-Operating_System
.	O
</s>
<s>
This	O
number	O
may	O
be	O
used	O
as	O
a	O
parameter	O
in	O
various	O
function	O
calls	O
,	O
allowing	O
processes	O
to	O
be	O
manipulated	O
,	O
such	O
as	O
adjusting	O
the	O
process	B-Operating_System
's	O
priority	O
or	O
killing	B-Operating_System
it	O
altogether	O
.	O
</s>
<s>
In	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
new	O
processes	O
are	O
created	O
by	O
the	O
fork( )	O
system	B-Operating_System
call	I-Operating_System
.	O
</s>
<s>
The	O
PID	O
is	O
returned	O
to	O
the	O
parent	B-Operating_System
process	I-Operating_System
,	O
enabling	O
it	O
to	O
refer	O
to	O
the	O
child	O
in	O
further	O
function	O
calls	O
.	O
</s>
<s>
The	O
parent	O
may	O
,	O
for	O
example	O
,	O
wait	O
for	O
the	O
child	O
to	O
terminate	O
with	O
the	O
waitpid( )	O
function	O
,	O
or	O
terminate	O
the	O
process	B-Operating_System
with	O
kill( )	O
.	O
</s>
<s>
There	O
are	O
two	O
tasks	O
with	O
specially	O
distinguished	O
process	B-Operating_System
IDs	I-Operating_System
:	O
swapper	O
or	O
sched	O
has	O
process	B-Operating_System
ID	I-Operating_System
0	O
and	O
is	O
responsible	O
for	O
paging	B-Architecture
,	O
and	O
is	O
actually	O
part	O
of	O
the	O
kernel	B-Operating_System
rather	O
than	O
a	O
normal	O
user-mode	B-Operating_System
process	B-Operating_System
.	O
</s>
<s>
Process	B-Operating_System
ID	I-Operating_System
1	O
is	O
usually	O
the	O
init	B-Operating_System
process	B-Operating_System
primarily	O
responsible	O
for	O
starting	O
and	O
shutting	O
down	O
the	O
system	O
.	O
</s>
<s>
Originally	O
,	O
process	B-Operating_System
ID	I-Operating_System
1	O
was	O
not	O
specifically	O
reserved	O
for	O
init	B-Operating_System
by	O
any	O
technical	O
measures	O
:	O
it	O
simply	O
had	O
this	O
ID	O
as	O
a	O
natural	O
consequence	O
of	O
being	O
the	O
first	O
process	B-Operating_System
invoked	O
by	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
More	O
recent	O
Unix	B-Application
systems	I-Application
typically	O
have	O
additional	O
kernel	B-Operating_System
components	O
visible	O
as	O
'	O
processes	O
 '	O
,	O
in	O
which	O
case	O
PID	O
1	O
is	O
actively	O
reserved	O
for	O
the	O
init	B-Operating_System
process	B-Operating_System
to	O
maintain	O
consistency	O
with	O
older	O
systems	O
.	O
</s>
<s>
Process	B-Operating_System
IDs	I-Operating_System
,	O
in	O
the	O
first	O
place	O
,	O
are	O
usually	O
allocated	O
on	O
a	O
sequential	O
basis	O
,	O
beginning	O
at	O
0	O
and	O
rising	O
to	O
a	O
maximum	O
value	O
which	O
varies	O
from	O
system	O
to	O
system	O
.	O
</s>
<s>
In	O
macOS	B-Application
and	O
HP-UX	B-Application
,	O
allocation	O
restarts	O
at	O
100	O
.	O
</s>
<s>
On	O
some	O
systems	O
,	O
like	O
MPE/iX	B-Operating_System
,	O
the	O
lowest	O
available	O
PID	O
is	O
used	O
,	O
sometimes	O
in	O
an	O
effort	O
to	O
minimize	O
the	O
number	O
of	O
process	B-Operating_System
information	O
kernel	B-Operating_System
pages	O
in	O
memory	O
.	O
</s>
<s>
The	O
current	O
process	B-Operating_System
ID	I-Operating_System
is	O
provided	O
by	O
a	O
getpid( )	O
system	B-Operating_System
call	I-Operating_System
,	O
or	O
as	O
a	O
variable	O
$$	O
in	O
shell	O
.	O
</s>
<s>
The	O
process	B-Operating_System
ID	I-Operating_System
of	O
a	O
parent	B-Operating_System
process	I-Operating_System
is	O
obtainable	O
by	O
a	O
getppid( )	O
system	B-Operating_System
call	I-Operating_System
.	O
</s>
<s>
On	O
Linux	B-Application
,	O
the	O
maximum	O
process	B-Operating_System
ID	I-Operating_System
is	O
given	O
by	O
the	O
pseudo-file	O
/proc/sys/kernel/pid_max	O
.	O
</s>
<s>
Some	O
processes	O
,	O
for	O
example	O
,	O
the	O
moc	B-Language
music	O
player	O
and	O
the	O
MySQL	B-Application
daemon	O
,	O
write	O
their	O
PID	O
to	O
a	O
documented	O
file	O
location	O
,	O
to	O
allow	O
other	O
processes	O
to	O
look	O
it	O
up	O
.	O
</s>
<s>
On	O
the	O
Windows	O
family	O
of	O
operating	B-General_Concept
systems	I-General_Concept
,	O
one	O
can	O
get	O
the	O
current	O
process	B-Operating_System
's	O
ID	O
using	O
the	O
GetCurrentProcessId( )	O
function	O
of	O
the	O
Windows	B-Library
API	I-Library
,	O
and	O
ID	O
of	O
other	O
processes	O
using	O
GetProcessId( )	O
.	O
</s>
<s>
Internally	O
,	O
process	B-Operating_System
ID	I-Operating_System
is	O
called	O
a	O
client	O
ID	O
,	O
and	O
is	O
allocated	O
from	O
the	O
same	O
namespace	O
as	O
thread	B-Operating_System
IDs	O
,	O
so	O
these	O
two	O
never	O
overlap	O
.	O
</s>
<s>
The	O
System	O
Idle	O
Process	B-Operating_System
is	O
given	O
process	B-Operating_System
ID	I-Operating_System
0	O
.	O
</s>
<s>
The	O
System	B-Operating_System
Process	I-Operating_System
is	O
given	O
the	O
process	B-Operating_System
ID	I-Operating_System
8	O
on	O
Windows	B-Application
2000	I-Application
and	O
4	O
on	O
Windows	B-Application
XP	I-Application
and	O
Windows	B-Application
Server	I-Application
2003	I-Application
.	O
</s>
<s>
On	O
the	O
Windows	B-Device
NT	I-Device
family	I-Device
of	O
operating	B-General_Concept
systems	I-General_Concept
,	O
process	B-Operating_System
and	O
thread	B-Operating_System
identifiers	O
are	O
all	O
multiples	O
of	O
4	O
,	O
but	O
it	O
is	O
not	O
part	O
of	O
the	O
specification	O
.	O
</s>
