233:, allocation restarts at 100. However, for this and subsequent passes any PIDs still assigned to processes are skipped. Some consider this to be a potential security vulnerability in that it allows information about the system to be extracted, or messages to be covertly passed between processes. As such, implementations that are particularly concerned about security may choose a different method of PID assignment. On some systems, like
25:
220:
process primarily responsible for starting and shutting down the system. Originally, process ID 1 was not specifically reserved for init by any technical measures: it simply had this ID as a natural consequence of being the first process invoked by the kernel. More recent Unix systems typically have
224:
Process IDs, in the first place, are usually allocated on a sequential basis, beginning at 0 and rising to a maximum value which varies from system to system. Once this limit is reached, allocation restarts at 300 and again increases. In
397:
212:, which is part of the kernel and is a process that runs on a CPU core whenever that CPU core has nothing else to do. Linux also calls the threads of this process
221:
additional kernel components visible as 'processes', in which case PID 1 is actively reserved for the init process to maintain consistency with older systems.
216:. In some APIs, PID 0 is also used as a special value that always refers to the calling thread, process, or process group. Process ID 1 is usually the
160:. This number may be used as a parameter in various function calls, allowing processes to be manipulated, such as adjusting the process's priority or
539:
42:
189:, enabling it to refer to the child in further function calls. The parent may, for example, wait for the child to terminate with the
603:
108:
561:
237:, the lowest available PID is used, sometimes in an effort to minimize the number of process information kernel pages in memory.
89:
61:
234:
46:
68:
646:
335:
of operating systems, process and thread identifiers are all multiples of 4, but it is not part of the specification.
75:
316:
35:
308:
141:
57:
178:
499:
361:
482:
328:
312:
157:
431:
356:
82:
279:
daemon, write their PID to a documented file location, to allow other processes to look it up.
599:
446:
332:
583:
350:
272:
138:
516:
344:
595:
588:
461:
186:
161:
619:
640:
416:
320:
296:
204:
There are two tasks with specially distinguished process IDs: PID 0 is used for
182:
24:
324:
627:
569:
547:
291:
family of operating systems, one can get the current process's ID using the
191:
173:
122:
382:
288:
153:
197:
16:
Number used by operating system kernels to identify an active process
276:
256:
230:
226:
149:
248:
in shell. The process ID of a parent process is obtainable by a
217:
145:
18:
586:; David A. Solomon (2005), "Chapter 2: System Architecture",
504:
487:
259:, the maximum process ID is given by the pseudo-file
176:
operating systems, new processes are created by the
620:"Why are process and thread IDs multiples of four?"
49:. Unsourced material may be challenged and removed.
587:
517:"proc - process information pseudo-filesystem"
307:, and is allocated from the same namespace as
399:Linux kernel code: tools/perf/builtin-sched.c
8:
594:(4th ed.), Microsoft Press, p.
433:sched_setscheduler(2) — Linux manual page
109:Learn how and when to remove this message
463:comp.unix.aix Frequently Asked Questions
240:The current process ID is provided by a
195:function, or terminate the process with
374:
448:pid_namespaces(7) — Linux manual page
311:IDs, so these two never overlap. The
303:. Internally, process ID is called a
7:
47:adding citations to reliable sources
299:, and ID of other processes using
14:
271:Some processes, for example, the
156:—to uniquely identify an active
23:
34:needs additional citations for
540:"GetCurrentProcessId Function"
244:system call, or as a variable
1:
404:pid 0 == swapper == idle task
319:is given the process ID 8 on
185:. The PID is returned to the
618:Chen, Raymond (2008-02-28),
590:Microsoft Windows Internals
418:kill(2) — Linux manual page
315:is given process ID 0. The
137:) is a number used by most
663:
521:Linux Programmer's Manual
261:/proc/sys/kernel/pid_max
562:"GetProcessId function"
362:Program Segment Prefix
293:GetCurrentProcessId()
275:music player and the
58:"Process identifier"
43:improve this article
647:Process (computing)
329:Windows Server 2003
313:System Idle Process
566:Windows Dev Center
544:Windows Dev Center
357:Handle (computing)
144:—such as those of
127:process identifier
624:The Old New Thing
584:Russinovich, Mark
572:, 5 December 2018
550:, 5 December 2018
333:Windows NT family
283:Microsoft Windows
119:
118:
111:
93:
654:
631:
630:
615:
609:
608:
593:
580:
574:
573:
558:
552:
551:
536:
530:
529:
528:
527:
513:
507:
506:
496:
490:
489:
479:
473:
472:
471:
470:
458:
452:
451:
443:
437:
436:
428:
422:
421:
413:
407:
406:
394:
388:
387:
379:
351:Group identifier
302:
295:function of the
294:
262:
251:
247:
243:
200:
194:
181:
139:operating system
114:
107:
103:
100:
94:
92:
51:
27:
19:
662:
661:
657:
656:
655:
653:
652:
651:
637:
636:
635:
634:
617:
616:
612:
606:
582:
581:
577:
560:
559:
555:
538:
537:
533:
525:
523:
515:
514:
510:
498:
497:
493:
481:
480:
476:
468:
466:
460:
459:
455:
445:
444:
440:
430:
429:
425:
415:
414:
410:
396:
395:
391:
381:
380:
376:
371:
345:User identifier
341:
300:
292:
285:
269:
260:
249:
245:
241:
196:
190:
177:
170:
164:it altogether.
115:
104:
98:
95:
52:
50:
40:
28:
17:
12:
11:
5:
660:
658:
650:
649:
639:
638:
633:
632:
610:
604:
575:
553:
531:
508:
491:
474:
453:
438:
423:
408:
389:
384:What is PID 0?
373:
372:
370:
367:
366:
365:
359:
354:
348:
340:
337:
317:System Process
301:GetProcessId()
284:
281:
268:
265:
187:parent process
169:
166:
117:
116:
31:
29:
22:
15:
13:
10:
9:
6:
4:
3:
2:
659:
648:
645:
644:
642:
629:
625:
621:
614:
611:
607:
605:0-7356-1917-4
601:
597:
592:
591:
585:
579:
576:
571:
567:
563:
557:
554:
549:
545:
541:
535:
532:
522:
518:
512:
509:
505:
501:
495:
492:
488:
484:
478:
475:
465:
464:
457:
454:
450:
449:
442:
439:
435:
434:
427:
424:
420:
419:
412:
409:
405:
401:
400:
393:
390:
386:
385:
378:
375:
368:
363:
360:
358:
355:
352:
349:
346:
343:
342:
338:
336:
334:
330:
326:
322:
318:
314:
310:
306:
298:
290:
282:
280:
278:
274:
266:
264:
258:
253:
252:system call.
238:
236:
232:
228:
222:
219:
215:
211:
207:
202:
199:
193:
188:
184:
180:
175:
167:
165:
163:
159:
155:
151:
147:
143:
140:
136:
132:
128:
124:
113:
110:
102:
91:
88:
84:
81:
77:
74:
70:
67:
63:
60: –
59:
55:
54:Find sources:
48:
44:
38:
37:
32:This article
30:
26:
21:
20:
623:
613:
589:
578:
565:
556:
543:
534:
524:, retrieved
520:
511:
503:
494:
486:
477:
467:, retrieved
462:
456:
447:
441:
432:
426:
417:
411:
403:
398:
392:
383:
377:
321:Windows 2000
304:
286:
270:
254:
239:
223:
213:
209:
205:
203:
171:
134:
130:
126:
120:
105:
99:October 2017
96:
86:
79:
72:
65:
53:
41:Please help
36:verification
33:
297:Windows API
183:system call
526:2009-12-28
469:2008-07-21
369:References
325:Windows XP
214:idle tasks
131:process ID
69:newspapers
628:Microsoft
570:Microsoft
548:Microsoft
500:"getppid"
331:. On the
323:and 4 on
305:client ID
250:getppid()
192:waitpid()
174:Unix-like
168:Unix-like
123:computing
641:Category
483:"getpid"
339:See also
242:getpid()
129:(a.k.a.
289:Windows
287:On the
267:Pidfile
206:swapper
162:killing
158:process
154:Windows
142:kernels
83:scholar
602:
309:thread
235:MPE/iX
198:kill()
179:fork()
125:, the
85:
78:
71:
64:
56:
364:(PSP)
353:(GID)
347:(UID)
277:MySQL
257:Linux
231:HP-UX
227:macOS
210:sched
150:macOS
90:JSTOR
76:books
600:ISBN
327:and
246:$ $
229:and
218:init
152:and
146:Unix
62:news
273:moc
255:On
208:or
172:In
135:PID
133:or
121:In
45:by
643::
626:,
622:,
598:,
596:76
568:,
564:,
546:,
542:,
519:,
502:,
485:,
402:,
263:.
201:.
148:,
112:)
106:(
101:)
97:(
87:·
80:·
73:·
66:·
39:.
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.