Fact-checked by Grok 2 weeks ago

Process identifier

A process identifier (PID) is a unique, non-negative integer value assigned by an operating system kernel to each running process, serving as its primary means of identification for management, tracking, and inter-process communication. This identifier enables the kernel to distinguish processes, allocate resources, and enforce security contexts, ensuring orderly execution in multitasking environments. Originally 16-bit in early Unix systems, PIDs have expanded to 32-bit or more in modern implementations. PIDs are fundamental to process control operations, such as creation, termination, and signaling, across various operating systems including Unix-like systems and Windows. In and BSD-derived systems such as macOS, PIDs are automatically assigned sequentially upon creation via system calls like fork(), with the initial (often init or systemd) receiving PID 1 as the root of the hierarchy. PID 0 is reserved for the scheduler . The PID range extends up to a configurable maximum, historically defaulting to 32,767 but in recent s (as of 2025) often set to 65,535 or higher, and extendable up to 4,194,304 via the pid_max parameter. Tools like ps, top, and kill rely on PIDs to list, monitor, and terminate es, while the /proc/<PID> directory provides detailed runtime information such as command lines and status for each . Parent-child relationships are tracked using the parent PID (PPID), facilitating trees that reflect system initialization and dependencies. In Microsoft Windows, PIDs function similarly as unique 32-bit unsigned integers assigned at process creation through APIs like CreateProcess, allowing the system to manage virtual address spaces, handles, and security for each process. Windows utilities such as , tasklist, and cmdlets use PIDs to identify and manipulate running processes, with the maximum value reaching 4,294,967,295 due to the DWORD format. Unlike Unix, Windows does not emphasize a strict hierarchical PID assignment but integrates PIDs into broader , including thread identifiers within processes. Across all systems, PID reuse occurs after termination to conserve space, though delays prevent immediate conflicts in active operations.

Introduction

Definition

A process identifier (PID) is a unique positive assigned by the operating system to each running , serving as its identifier during the process's lifetime from creation to termination. This numerical value allows the kernel to distinguish one process from another in a multitasking , where multiple processes execute concurrently. In POSIX-compliant systems, such as operating systems, PIDs are typically represented using the pid_t in C programming, defined in the <sys/types.h> header as a signed integer capable of holding identifiers. In practice, this type is often implemented as a 32-bit integer, though its exact size may vary by system architecture. The core purpose of a PID is to facilitate kernel-level management of , including operations such as scheduling execution priorities, sending signals for , allocating system resources, and initiating termination. For instance, system calls like kill() and setpriority() rely on PIDs to target specific for signaling or resource adjustment. In multitasking systems, this enables precise control, allowing to interact via targeted system calls without ambiguity. In Unix-like systems, certain values hold special significance; for example, PID 1 is assigned to the init process (or its equivalent), serving as the root of the process hierarchy. The value 0 is used in some system calls, such as kill(), to refer to the current process group.

Historical Development

The concept of a process identifier (PID) originated in the early development of the Unix operating system at Bell Laboratories during the 1970s. In the initial implementations on the PDP-7 and later PDP-11 systems, Unix introduced a multiprogramming environment where each process was uniquely tracked in the kernel using a simple integer PID. This identifier was assigned sequentially upon process creation via the fork() system call, which duplicated the parent process and returned the child's PID to enable inter-process communication and management. The kernel maintained a process table to store state information, such as memory images and open files, indexed by these PIDs, facilitating basic operations like waiting for child termination with wait(). By the late 1970s, as Unix evolved toward more structured system initialization, PID 1 became associated with the process, the first user-space program spawned by the after . Initially, PID 1 was not explicitly reserved, with the kernel's swapper holding PID 0; however, init quickly assumed responsibility for forking login shells and managing system daemons, using messages and primitives to handle terminations and restarts. This convention was formalized in AT&T's release around 1979, where init (PID 1) read configuration files to orchestrate service startup, establishing it as the of the and a for system across Unix variants. The push for portability in the led to the formalization of PIDs through the standards, beginning with IEEE Std 1003.1-1988 (). This standard defined process IDs as positive integers, guaranteed to be unique within the system and ranging from 1 to at least 32,767, with functions like getpid() and fork() providing consistent interfaces for PID retrieval and creation. Subsequent revisions, such as , refined process control semantics to ensure interoperability across systems, influencing implementations in BSD derivatives and commercial Unixes by specifying behaviors for process groups, signals, and termination without altering the core integer-based identification model. A significant evolution occurred in 2008 with the introduction of PID namespaces in the version 2.6.24, enabling isolated PID spaces to support technologies. Developed primarily by the team with contributions from , this feature allowed processes within a namespace to perceive a private view of PIDs—starting from 1 for the namespace's init-like process—while the global kernel maintained a hierarchical mapping. This isolation facilitated secure and process migration between hosts without PID conflicts, marking a key advancement in scalable, multi-tenant environments.

Core Concepts

PID Assignment and Allocation

In operating systems such as systems and Windows, process identifiers (s) are assigned by the during creation to ensure uniqueness within the system. In systems, a new PID is allocated sequentially when a is created via system calls like fork(), starting from a low value such as 1 for the initial and incrementing for subsequent ones. Similarly, in Windows, the assigns a PID upon invocation of CreateProcess, drawing from a shared pool of identifiers used for both processes and threads. This sequential or pooled allocation mechanism allows the to track processes efficiently without duplication. The range of available PIDs varies by operating system and architecture but is typically bounded to prevent exhaustion. In many Unix-like systems, PIDs begin near 0 or a small offset (e.g., 1, with some systems reserving lower numbers for kernel tasks to avoid conflicts) and extend up to a configurable maximum; for instance, the kernel default maximum is 32,768 across architectures, though 64-bit Linux systems allow configuration up to 4,194,304 via the /proc/sys/kernel/pid_max parameter. In Windows, PIDs are 32-bit values aligned to multiples of 4 (due to allocation from the kernel handle table), theoretically ranging up to approximately 4,294,967,292 (0xFFFFFFFC), though practical limits are lower based on system resources. These ranges support scalability, with wrap-around occurring at the upper limit to reuse lower values after exhaustion. PID reuse follows strict policies to mitigate race conditions where a new might inherit an old one's resources prematurely. Upon termination, the PID becomes available only after the reaps the (e.g., via wait() in systems) and all references are cleared; in , freed PIDs are tracked and reassigned cyclically, skipping recently released ones briefly if needed for safety. In Windows, reuse happens immediately once all handles to the object are closed and the object is destroyed, ensuring the PID can be reallocated without overlap. Full wrap-around to the starting range occurs only after the maximum is reached, maintaining system stability. To enforce uniqueness, the employs specialized data structures for PID management. In , an Interval Descriptor Radix (IDR) tree combined with a tracks allocated , enabling efficient allocation, lookup, and freeing across ; as of Linux 6.14, the pid_max limit is adjustable per PID namespace. Windows uses a multilevel handle table for PID tracking, integrating and IDs into a unified pool managed by the executive object manager. These structures ensure O(1) or near-constant time operations for assignment and verification, critical for high-throughput environments.

Special Process Identifiers

In systems, PID 0 represents the idle task, also known as or scheduler process, which is a kernel thread responsible for handling system idle time and paging operations. This process is integral to the and executes exclusively in kernel mode, ensuring it never functions as a user-space process. As a result, PID 0 cannot be assigned to any user-initiated and is protected from termination by standard user commands, maintaining system stability during idle periods. PID 1 denotes the init process, the first user-space process launched by the kernel after boot, which serves as the root of the process tree and is responsible for initializing and managing all subsequent processes. In modern Linux distributions, this role is typically fulfilled by systemd, which oversees service startup, system state transitions, and resource management. A key function of PID 1 is to adopt orphaned child processes—those whose parent has terminated—reparenting them to prevent resource leaks and automatically reaping any resulting zombie processes through wait system calls. Like PID 0, PID 1 is safeguarded against normal termination; signals sent to it are ignored unless explicit handlers are installed, and it possesses elevated privileges to manage system-wide operations. Beyond PIDs 0 and 1, other reserved identifiers include PID 2, which in is assigned to kthreadd, the thread daemon that spawns and manages all other threads. These threads, children of kthreadd, operate without and inherit -level privileges for and system tasks. Additionally, special semantics apply to PID 0 and negative values in certain system calls, such as : a PID of 0 targets all processes in the caller's , while a negative PID (less than -1) targets an entire identified by the , excluding protected system processes like . These conventions ensure precise control over s without directly referencing individual PIDs, and such special PIDs remain shielded from routine intervention to preserve integrity.

Implementation in Unix-like Systems

Standard Unix PIDs

In standard Unix-like systems, new processes are created using the fork() system call, which duplicates the calling process. Upon successful completion, fork() returns 0 to the child process and the positive process ID (PID) of the newly created child to the parent process. This dual return value allows the parent and child to distinguish their roles immediately after the call, enabling the child to execute different code paths, such as loading a new program image via exec(). Several key system functions facilitate interaction with PIDs in these systems. The getpid() function returns the PID of the calling , providing a for in operations like or naming. Similarly, getppid() retrieves the PID of the , which is essential for establishing process hierarchies and managing . For , waitpid() allows a parent to suspend execution until a specific changes state, such as termination, and retrieve its ; it takes the child's PID as an argument along with options to control behavior. Additionally, the kill() function sends a signal to a process identified by its PID, enabling actions like termination (via SIGTERM) or interruption, provided the calling process has appropriate permissions. POSIX standards ensure that PIDs are unique nonnegative s within the system-wide namespace, preventing conflicts while a exists and allowing reliable identification across the and user space. This uniqueness is fundamental to management, as duplicate PIDs would undermine system calls relying on them for targeting. For example, the init , which bootstraps the system, is conventionally assigned PID 1. In traditional implementations, PIDs typically range from 1 to 32767, reflecting a 15-bit allocation in early Unix designs to fit within limits. The assigns PIDs sequentially from this range, skipping those already in use, and wraps around to low numbers upon reaching the maximum, ensuring continued availability without exhaustion under normal loads.

PID Namespaces in Linux

PID namespaces provide a mechanism in the for isolating process identifier spaces, allowing multiple independent sets of process IDs to coexist on the same system. This feature was introduced in kernel version 2.6.24 in 2008, enabling processes within a namespace to perceive their as unique only relative to that isolated environment, rather than the global system view. New PID namespaces are created using the clone(2) with the CLONE_NEWPID flag, which spawns a in the new , or via unshare(2) with the same flag followed by a fork(2) to place a child in the namespace. The first process established in a new PID namespace receives PID 1 and functions as the process for that namespace, handling tasks such as reaping children within its scope. PID namespaces organize into a hierarchical , with the root namespace representing the global PID space and child namespaces nested beneath it; since Linux 3.7, the maximum nesting depth is limited to levels to prevent excessive . Processes in a child namespace are visible to those in ancestor namespaces using their global PIDs, but not vice versa, ensuring isolation while allowing oversight from higher levels. The /proc/[pid]/ns/pid exposes the PID namespace of a process, and PIDs are translated automatically when passed between namespaces over UNIX domain sockets to maintain consistency in the recipient's view. A primary for PID namespaces is in technologies, such as , where they enable containers to maintain independent PID spaces, reusing low PIDs like 1 for container init processes without conflicting with the host system's PIDs. This isolation supports features like suspending or migrating container processes while preserving their internal PID assignments, enhancing security and manageability in virtualized environments.

PID Files

In Unix-like systems, PID files serve as a persistent mechanism for daemons to record their process identifier (), enabling external tools and init systems to monitor, signal, or manage the service without querying the entire process table. These files are plain text files containing a single representing the , typically created upon daemon startup and removed upon clean shutdown. The primary purposes of PID files include preventing multiple instances of the same daemon from running concurrently and facilitating service status checks or restarts by scripts. For instance, an script can read the PID from the file and use it to send signals via the kill() or verify if the process is active. This approach is particularly useful for long-running background services, as it provides a simple, file-based interface for inter-process coordination. PID files are conventionally stored in the /run or /var/run directory, with a filename derived from the daemon's name, such as /run/mydaemon.pid. To create the file, the daemon process—after forking to become a background task—opens it in write mode, often acquiring an exclusive lock to ensure atomicity and detect existing instances, then writes its PID obtained from getpid(2). Basic implementation uses standard library functions like fopen() to open the file and fprintf() to write the PID followed by a , ensuring the file contains only the numeric PID for easy parsing. Libraries such as libbsd provide higher-level functions like pidfile_open() and pidfile_write() to handle locking via flock(2) or equivalent, mitigating conditions during concurrent startups. Upon normal termination, the daemon removes the PID file using unlink(2) or equivalent, often in a signal handler for common termination signals like SIGTERM. This cleanup ensures accurate state tracking by management tools. In SysV-style init systems, PID files are integral to the status action in init scripts, where the presence of a PID file combined with a non-running process indicates a stale entry, returning exit code 1 to signal the error. Systemd supports PID files optionally through the PIDFile= directive in service unit files, allowing it to read the main PID for services of type forking, though it prefers direct process tracking for reliability. A key challenge with PID files is the risk of staleness from unclean shutdowns, such as system crashes, where the file persists without a corresponding . Best practices recommend that scripts validating the PID file always cross-check the existence of the process using tools like kill -0 <pid> to avoid acting on obsolete data. While not formally standardized in , this convention is widely adopted in SysV init and compatible systems for robust daemon management.

Implementation in Microsoft Windows

PID Structure

In the Windows NT , process (PIDs) are represented as 32-bit unsigned integers, known as DWORD values, allowing a theoretical range from 0 to 4,294,967,295. Due to alignment requirements in the 's allocation mechanism, PIDs are always multiples of 4, ensuring compatibility with (TIDs) that share the same numbering . This alignment is an implementation detail stemming from in the 's object manager, where the same allocation routines both process/ objects and general . When a new process is created via the CreateProcess API, the allocates a PID from an available pool managed by the object manager. This allocation occurs during the initialization of the executive process block (EPROCESS structure), where the PID is assigned as the UniqueProcessId field, a pointer-sized value that holds the 32-bit identifier even on 64-bit systems. The pool is shared with TIDs, meaning process and thread creations compete for the same sequence of identifiers, with the selecting the next available value aligned to 4. While the theoretical maximum supports approximately 4 billion unique PIDs, the practical number of concurrently active processes is constrained by system resources such as physical memory and the capacity of kernel data structures, often limiting it to hundreds of thousands on typical hardware. Upon termination, the PID becomes eligible for reuse only after the process object is fully destroyed, which requires closing all open handles to it—such as those obtained via OpenProcess or WaitForSingleObject. This delay, enforced by the handle table in the kernel's object manager, prevents race conditions where a new might inherit the PID before the old one's state is cleared, ensuring that queries like GetExitCodeProcess on lingering handles remain valid. PIDs and TIDs are tightly integrated within structures: the EPROCESS block stores the process's UniqueProcessId and links to a list of ETHREAD blocks via ThreadListHead, each containing a UniqueThreadId from the shared pool. This design allows the executive to efficiently manage process-thread hierarchies, with both identifiers serving as opaque handles in user-mode APIs while enabling -level tracking of execution contexts.

Special Processes

In Microsoft Windows, certain process identifiers (PIDs) are reserved for critical system processes that are managed exclusively by the and cannot be created, modified, or terminated by user-mode applications. These special processes play foundational roles in system operation and are visible in tools like , though they cannot be initiated or interacted with by users. PID 0 is assigned to the , a pseudo-process that accounts for CPU cycles not utilized by active tasks, effectively representing idle time. This process does not execute code but serves as a for system utilization; its reported CPU percentage inversely indicates overall system load. It is non-terminable and kernel-managed, ensuring it persists throughout the system's lifecycle. PID 4 designates the System process in Windows XP and later versions, which hosts kernel-mode system threads executed by the NT kernel (ntoskrnl.exe). This process initializes essential subsystems, including spawning the Session Manager Subsystem (smss.exe) as its first user-mode child, and manages low-level operations like interrupt handling and device drivers. In earlier versions such as , the System process used PID 8 for similar purposes. Like PID 0, it is protected by the , preventing termination or user intervention, and appears in process lists to reflect kernel activity. These reserved PIDs align with Windows' handle allocation scheme, where identifiers are multiples of 4 to optimize kernel object management, ensuring stability for core system functions.

Other Operating Systems

BSD Variants

In BSD-derived operating systems such as and , process identifiers (PIDs) follow a sequential assignment model akin to traditional Unix systems, beginning at and incrementing until reaching a system-defined maximum before wrapping around. In , the default maximum PID is 99999, configurable via the kern.pid_max parameter, while uses a maximum of 32766. PIDs are not immediately reused upon process exit; instead, the delays reassignment until the PID slot is cleared, typically after the parent process has acknowledged the child's termination via wait(). Both systems employ 32-bit PIDs as the standard type, limiting the addressable range to signed 32-bit integers. Special PIDs reserve low numbers for kernel and foundational processes. PID 0 represents the 's idle or swapper process, responsible for system scheduling and paging activities, and is not a user-space process. PID 1 is assigned to the process, the root of the process tree that manages system initialization, daemon startup, and reparenting of orphaned processes in both and . FreeBSD provides access to PID-related process information through the filesystem, mountable at /proc, where each active PID corresponds to a directory containing files with details such as process status, command-line arguments, memory maps, and resource usage. OpenBSD enhances process security via the pledge() , which allows a process to self-restrict its system call capabilities; omitting the "proc" promise prevents access to other processes' information through mechanisms like () or , thereby limiting inter-process visibility for heightened security. FreeBSD's jails feature implements lightweight with PID visibility isolation: while PIDs share a global across the host and all jails, processes confined to a jail cannot observe or interact with PIDs outside their jail, enforcing compartmentalization without namespace separation. This design, introduced in 4.0, enables secure multi-tenancy by masking external processes and IDs from jailed environments.

macOS Specifics

macOS, built on the kernel which derives from BSD, employs identifiers () in a manner consistent with systems but incorporates Apple-specific extensions. in macOS are assigned sequentially starting from 1, with a maximum value of 99999 defined in the kernel source. The system initializes with as the root holding PID 1, serving as the modern equivalent of the traditional to manage system services, daemons, and agents. This design allows to oversee lifecycle events from boot, replacing older mechanisms while maintaining compatibility with standards. New processes are created using the standard and exec system calls, where duplicates the calling process and exec replaces its image with a , assigning the next available from the kernel's allocation pool. macOS enhances concurrency through Grand Central Dispatch (GCD), a that abstracts management by submitting tasks to system-managed queues, ensuring multiple threads within a single process share the same for visibility in tools like Activity Monitor. This approach optimizes resource usage across multicore hardware without altering assignment, as GCD operates within the bounds of existing processes rather than spawning new ones. Special PIDs include 0, reserved for the kernel_task, which represents the kernel's primary task and handles core functions like thermal management and memory paging. Beyond traditional PIDs, macOS leverages the XNU kernel's Mach ports for inter-process communication (IPC), providing asynchronous message passing between tasks via kernel-managed channels that extend functionality without relying solely on PID-based signaling. These ports enable efficient, capability-based interactions, such as bootstrap services, complementing PID usage in distributed systems. For virtualization and containerization, macOS lacks native support for Linux-style PID namespaces due to its BSD heritage; instead, tools like integrate via a lightweight (VM) powered by the .framework. Within this VM, containers employ -compatible PID namespaces for , maintaining BSD-style PID handling on the host macOS system and preventing direct interference with native processes. This hybrid model ensures security and compatibility while preserving macOS's process management paradigms.

Management and Tools

Viewing and Monitoring PIDs

In operating systems, the ps command provides a of current es, displaying details such as process IDs (PIDs), parent PIDs (PPIDs), and status information like running, sleeping, or states. For real-time monitoring, the top command offers a dynamic view of system es, including PIDs, CPU and memory usage, and allows sorting by resource consumption. An enhanced alternative, htop, presents this data in a more user-friendly, interactive interface with color-coded output and mouse support for navigating lists. To search for processes by name or attributes and retrieve PIDs without full listings, pgrep scans running es and outputs matching PIDs, while pkill extends this by sending signals to terminate them based on similar criteria. On Microsoft Windows, the tasklist command enumerates active , showing PIDs, process names, session IDs, and memory usage, with options to filter by image name or module. The graphical provides a visual overview of processes via its Processes and Details tabs, where users can view PIDs, CPU load, and end tasks directly, aiding quick identification of resource-intensive applications. For scriptable queries, the Command-line (WMIC) tool, deprecated since and removed after upgrading to version 25H2 (as of 2025), previously allowed retrieval of process details through SQL-like statements, such as wmic process list brief to list PIDs and command lines. The recommended modern alternative is PowerShell's Get-Process cmdlet, which retrieves PIDs, process names, and other details, for example Get-Process | Select-Object Id, ProcessName. Cross-platform mechanisms include the /proc filesystem in and BSD variants, where directories like /proc/<pid>/status expose per-process information such as PID, PPID, state, and statistics in a readable text format. In Windows, logs process-related events, including creation, termination, and errors from the System and Application logs, enabling retrospective analysis of PID activities. These tools facilitate by identifying hung processes via PID inspection and resource tracking to pinpoint performance bottlenecks, for instance, using ps aux | [grep](/page/Grep) <process_name> to locate a specific application's in environments.

Programming Interfaces

In operating systems adhering to the standard, several system calls and library functions enable programs to query, create, and manage identifiers (). The getpid() function returns the PID of the calling , which is a positive uniquely identifying the process within its . Similarly, getppid() retrieves the PID of the parent , useful for establishing hierarchies. The fork() system call creates a new child by duplicating the calling , returning the child's PID to the parent and zero to the child; this PID can then be used for subsequent operations on the child. To interact with other processes, provides kill(pid, signal), which sends a specified signal to the process identified by pid; if pid is positive, it targets a single process, while negative values address process groups. For synchronization, waitpid(pid, status, options) allows a process to wait for state changes in a specific child process, storing exit status or signal information upon termination; the pid argument specifies the target child, with options like WNOHANG enabling non-blocking waits. These functions typically use the pid_t type for PIDs, an integer type defined in <sys/types.h> to ensure portability across -compliant systems. In Windows, the Win32 API offers analogous functions for PID manipulation, using the DWORD type (an unsigned 32-bit integer) for process identifiers. GetCurrentProcessId() retrieves the of the calling , providing a straightforward way to self-identify in code. For an existing process handle, GetProcessId(hProcess) extracts the associated . To access another by PID, OpenProcess(desired_access, inherit_handle, process_id) returns a if the caller has sufficient privileges, enabling further operations like reading or injecting threads. Termination is handled by TerminateProcess(hProcess, exit_code), which forcefully ends the using its , often obtained via OpenProcess. Cross-platform programming abstracts these differences through higher-level libraries. In , the os module provides os.getpid() to fetch the current process , wrapping the underlying getpid() on systems or GetCurrentProcessId() on Windows for portability. Similarly, os.kill(pid, signal) sends signals on Unix, while on Windows it maps to TerminateProcess for SIGTERM. For C++, there is no function for process IDs, requiring platform-specific includes: <unistd.h> with getpid() on systems or <windows.h> with GetCurrentProcessId() on Windows; libraries like Boost.Process can unify this by providing a common interface, such as boost::process::child::id(). Developers must handle type differences, casting pid_t to DWORD or vice versa when interfacing across platforms to avoid overflow or sign issues. Error handling is crucial for robust PID interactions, as invalid or inaccessible PIDs can lead to failures. In POSIX, kill() returns -1 and sets errno to ESRCH if the target PID does not exist, EPERM if the caller lacks permission to signal a process owned by another user (unless the signal is ignored or caught), and EINVAL for an invalid signal number. waitpid() similarly sets ECHILD if the specified PID is not a child of the caller, or EINVAL for invalid options. Permissions checks enforce security: only the owner, root, or processes with appropriate capabilities can signal foreign PIDs, preventing unauthorized access. In Windows, OpenProcess fails with ERROR_INVALID_PARAMETER for invalid PIDs or ERROR_ACCESS_DENIED for insufficient privileges, returning NULL and setting the last error code via GetLastError(). These mechanisms ensure safe, secure PID usage across environments.

References

  1. [1]
    PID is used to identify processes - The Linux Information Project
    Jul 6, 2005 · A PID (ie, process identification number) is an identification number that is automatically assigned to each process when it is created on a Unix-like ...
  2. [2]
    Operating Systems: Processes
    Each process is given an integer identifier, termed its process identifier, or PID. The parent PID ( PPID ) is also stored for each process. On typical UNIX ...
  3. [3]
    About Processes and Threads - Win32 apps | Microsoft Learn
    Jul 14, 2025 · A process has a virtual address space, executable code, open handles to system objects, a security context, a unique process identifier ...<|control11|><|separator|>
  4. [4]
    Find Process ID (PID) in Windows - Windows drivers | Microsoft Learn
    Learn how to find a process ID (PID) in Windows using Task Manager, tasklist command, TList utility, or PowerShell. Identify running processes quickly.To find a PID using Task... · The tasklist command
  5. [5]
    Process Class (System.Diagnostics) - Microsoft Learn
    A system process is uniquely identified on the system by its process identifier. Like many Windows resources, a process is also identified by its handle, which ...
  6. [6]
  7. [7]
    credentials(7) - Linux manual page - man7.org
    A PID is represented using the type pid_t (defined in <sys/types.h>). PIDs are used in a range of system calls to identify the process affected by the call ...
  8. [8]
    [PDF] The UNIX Time- Sharing System
    The UNIX Time-. Sharing System. Dennis M. Ritchie and Ken Thompson. Bell Laboratories. UNIX is a general-purpose, multi-user, interactive operating system for ...Missing: PID | Show results with:PID
  9. [9]
    [PDF] The Evolution of the Unix Time-sharing System*
    Canaday, and Ritchie developed, on blackboards and scribbled notes, the basic design of a file system that was later to become the heart of Unix. Most of the ...
  10. [10]
    Initializing and Managing Services in Linux: Past, Present and Future
    May 20, 2015 · In this article, I focus on the history of the init system as it relates to Linux, and I talk about the role of init in a modern Linux system.
  11. [11]
    The hunt for POSIX.1-1988 | LupLab @ UC Davis
    Nov 4, 2021 · This first version focused strictly on core services: process creation and control, signals, file and directory operations, pipes, C library, ...
  12. [12]
    [PDF] IEEE standard portable operating system interface for computer ...
    (1) The child process has a unique process ID. The child process ID also does not match any active process group ID. (2) The child process has a different ...
  13. [13]
    PID namespaces in the 2.6.24 kernel - LWN.net
    Nov 19, 2007 · The PID namespace allows for creating sets of tasks, with each such set looking like a standalone machine with respect to process IDs.
  14. [14]
    Linux_2_6_24 - Linux Kernel Newbies
    Jan 24, 2008 · Linux 2.6.24 adds PID namespaces and basic support for network namespaces. They're used through the CLONE_NEWPID and CLONE_NEWNET clone() flags.
  15. [15]
    fork(2) - Linux manual page - man7.org
    On success, the PID of the child process is returned in the parent, and 0 is returned in the child. On failure, -1 is returned in the parent, no child process ...
  16. [16]
    Documentation for /proc/sys/kernel/ — The Linux Kernel documentation
    ### Summary of `pid_max` from https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html
  17. [17]
    Maximum value of process ID - Microsoft Q&A
    Aug 19, 2020 · A process id is a DWORD (unsigned 32-bit value). The maximum value of a DWORD is 0xFFFFFFFF (or -1 as a signed 32 bit value).
  18. [18]
    When does a process ID become available for reuse?
    Jan 7, 2011 · I'm writing some code that depends on process IDs and I'd like to understand better problem of process ID reuse. When can PIDs be reused?
  19. [19]
  20. [20]
    How Windows/Linux assign PID to processes? - Super User
    Sep 22, 2014 · This answer is Windows-specific. PIDs are not random. PIDs (and thread IDs; they're in the same "number space") are managed through a multilevel table ...How are PIDs generated? - unixIs a process PID guaranteed to stay the same as long ...More results from superuser.com
  21. [21]
    Linux Kernel 2.4 Internals
    Aug 7, 2002 · Idle tasks all have pid = 0 and no other task can share pid, i.e. use CLONE_PID flag to clone(2). Kernel threads are created using kernel_ ...
  22. [22]
    kill(2) - Linux manual page
    ### Summary of Special PIDs in `kill(2)`
  23. [23]
    systemd(1) - Linux manual page - man7.org
    When run as first process on boot (as PID 1), it acts as init system that brings up and maintains userspace services. Separate instances are started for ...
  24. [24]
    wait(2) - Linux manual page
    ### Summary of Orphan Processes and PID 1 from wait(2) Man Page
  25. [25]
    What is a kernel thread? | SUSE Communities
    Aug 15, 2022 · A kernel thread spends all runtime in kernel mode, has no user memory space, and is forked from PID 2, with top ancestor PID 0 except from PID ...
  26. [26]
    kill
    If pid is greater than 0, sig shall be sent to the process whose process ID is equal to pid. If pid is 0, sig shall be sent to all processes (excluding an ...
  27. [27]
    fork - The Open Group Publications Catalog
    Upon successful completion, fork() shall return 0 to the child process and shall return the process ID of the child process to the parent process. Both ...Missing: PID | Show results with:PID
  28. [28]
    getpid
    The getpid() function shall return the process ID of the calling process. RETURN VALUE. The getpid() function shall always be successful and no return value ...
  29. [29]
    getppid
    The getppid() function shall return the parent process ID of the calling process. RETURN VALUE. The getppid() function shall always be successful and no ...
  30. [30]
    wait
    The waitpid() function shall report the status of any continued child process specified by pid whose status has not been reported since it continued from a job ...
  31. [31]
    Unix Concepts
    ... Dennis Ritchie invented the C programming language in 1971. By 1973 the ... Run cat /proc/$PID/status where $PID is the process ID of the sleep process.
  32. [32]
    pid_namespaces(7) - Linux manual page - man7.org
    The namespace init process The first process created in a new namespace (i.e., the process created using clone(2) with the CLONE_NEWPID flag, or the first child ...
  33. [33]
    Building containers by hand: The PID namespace - Red Hat
    Apr 30, 2021 · In this article, I step through the PID namespace and demonstrate how you can use it, along with the mnt namespace, to secure your fledgling container further.
  34. [34]
    daemon(7) - Linux manual page - man7.org
    12. In the daemon process, write the daemon PID (as returned by getpid()) to a PID file, for example /run/foobar.pid ( ...
  35. [35]
    Init Script Actions
    ### Summary on PID Files in Init Scripts for Daemons
  36. [36]
    pidfile(3) — libbsd-dev — Debian testing
    Apr 24, 2016 · The pidfile family of functions allows daemons to handle PID files. It uses flopen(3) to lock a pidfile and detect already running daemons. The ...
  37. [37]
    systemd.service - Freedesktop.org
    However, if the process decides to write a traditional PID file, systemd will be able to read the main PID from there. Please set PIDFile= accordingly. Note ...
  38. [38]
    Why are process and thread IDs multiples of four? - The Old New ...
    Feb 28, 2008 · Process and thread IDs are multiples of four as a side-effect of code re-use. The same code the allocates kernel handles is also used to ...Missing: structure 32- bit unsigned
  39. [39]
    CreateProcessW function (processthreadsapi.h) - Win32 apps
    Feb 8, 2023 · The processthreadsapi.h header defines CreateProcess as an alias that automatically selects the ANSI or Unicode version of this function based ...
  40. [40]
    EPROCESS - Geoff Chappell, Software Analyst
    Jun 15, 2016 · The EPROCESS structure (formally _EPROCESS) is the kernel's representation of a process object. For instance, if the ObReferenceObjectByHandle function ...
  41. [41]
    What is the maximum process Id on Windows? - Stack Overflow
    Jul 25, 2013 · Theoretically maximum process id is DWORD_MAX aligned to 4: 0xFFFFFFFC (as pid/tid values are aligned to 4 on Windows).What is the max possible length of a PID of a process? (64 bit)Maximum process id (pid) in Windows Server 2008 R2More results from stackoverflow.com
  42. [42]
    Windows System Process (PID 4) vs System Idle Process ... - Medium
    Indicates available CPU capacity; high values mean your system is free to take on more work. Neither process is ...<|control11|><|separator|>
  43. [43]
    Windows Processes part 2(Investigating PID 4) - HACKLIDO
    Oct 28, 2022 · The System process (process ID 4) is the home for a special kind of thread that runs only in kernel mode a kernel-mode system thread.
  44. [44]
    Troubleshooting the System process (CPU Spikes) - RickTeck
    May 15, 2011 · The System process (PID 8 in Windows 2000 and process ID 4 in Windows XP; Vista and Windows 2003) houses kernel-mode system threads. System ...
  45. [45]
    Understanding PID and TID Number Patterns in Windows - Medium
    Aug 10, 2025 · Ever noticed that every Process ID (PID) and Thread ID (TID) in Windows is divisible by 4? This guide explains why, covering kernel handles, ...
  46. [46]
    What is the maximum value of the Process ID?
    Jul 18, 2011 · The maximum value of a PID for 32-bit machine is 32767, not 32768. 0 is the scheduler and 1 is init, and then user processes get 2 through 32767.I see pids above 400000 why is that? Does it indicate something is ...Why is the maximum PID in a 64-bit Linux system 2^22?More results from unix.stackexchange.com
  47. [47]
    procmap(1) - OpenBSD manual pages
    The procmap utility lists the virtual memory mappings underlying the given process. The start address of each entry is always given.Missing: allocation | Show results with:allocation
  48. [48]
    init(8) - OpenBSD manual pages
    The init program is the last stage of the boot process. It normally executes the sequence of events described in rc(8) and begins multi-user operation.Missing: PID | Show results with:PID
  49. [49]
    procfs - FreeBSD Manual Pages
    /proc/pid directory containing process information for process pid. /proc/curproc directory containing process information for the current process /proc ...
  50. [50]
    pledge(2) - OpenBSD manual pages
    The pledge() system call forces the current process into a restricted-service operating mode. A few subsets are available.Missing: visibility | Show results with:visibility
  51. [51]
    [PDF] Jails: Confining the omnipotent root.
    Mar 18, 1982 · The FreeBSD ''Jail'' facility provides the ability to partition the operat- ing system environment, while maintaining the simplicity of the UNIX.<|control11|><|separator|>
  52. [52]
    fork | Apple Developer Documentation
    The process created one or more child processes ... All process-related events. static let exec: DispatchSource.ProcessEvent. The process became another ...
  53. [53]
    Dispatch | Apple Developer Documentation
    ### Summary: How GCD Handles Threads and Relation to Processes/PIDs
  54. [54]
    If kernel_task is using a large percentage of your Mac CPU
    If kernel_task is using a large percentage of your Mac CPU. One of the functions of the kernel task process is to help manage the temperature of your CPU.Missing: XNU | Show results with:XNU
  55. [55]
    [PDF] POP and PUSH: Demystifying and Defending against (Mach) Port ...
    Feb 21, 2021 · A Mach port in XNU is a kernel controlled communica- tion channel between user-space processes and the kernel. A process with appropriate ...
  56. [56]
  57. [57]
    ps(1) - Linux manual page - man7.org
    -q pidlist Select by PID (quick mode). This selects the processes whose process ID numbers appear in pidlist. With this option ps reads the necessary info only ...
  58. [58]
    top(1) - Linux manual page - man7.org
    The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of processes or threads
  59. [59]
    htop(1) - Linux manual page - man7.org
    INTERACTIVE COMMANDS top. The following commands are supported while in htop: Tab, Shift-Tab Select the next / the previous screen tab to display. You can ...
  60. [60]
  61. [61]
    tasklist - Microsoft Learn
    Feb 3, 2023 · Reference article for the tasklist command, which displays a list of the processes running on the local or remote computer.
  62. [62]
    Troubleshoot processes by using Task Manager - Windows Server
    Jan 15, 2025 · You can use the Processes, Users, and Details tabs to view the active processes on the computer. The lists differ in how they sort and group the ...Missing: docs | Show results with:docs
  63. [63]
    WMI command-line (WMIC) utility - Win32 apps | Microsoft Learn
    Jul 15, 2024 · The WMI command-line (WMIC) utility provides a command-line interface for Windows Management Instrumentation (WMI). WMIC is compatible with existing shells and ...Alias · Switch
  64. [64]
    The /proc Filesystem - The Linux Kernel documentation
    The directory /proc contains (among other things) one subdirectory for each process running on the system, which is named after the process ID (PID). The link ' ...<|control11|><|separator|>
  65. [65]
    Event Logging (Event Logging) - Win32 apps | Microsoft Learn
    Aug 14, 2025 · Learn how Event Viewer provides a convenient and accessible location for you to observe events that occur. Access event information quickly and ...
  66. [66]
    getpid(2) - Linux manual page - man7.org
    getpid() returns the process ID (PID) of the calling process. (This is often used by routines that generate unique temporary filenames.)
  67. [67]
    GetCurrentProcessId function (processthreadsapi.h) - Win32 apps
    Feb 22, 2024 · Retrieves the process identifier of the calling process. Syntax. DWORD GetCurrentProcessId();. Return value. The return value is the process ...
  68. [68]
    GetProcessId function (processthreadsapi.h) - Win32 - Microsoft Learn
    Feb 22, 2024 · Retrieves the process identifier of the specified process.
  69. [69]
    OpenProcess function (processthreadsapi.h) - Win32 - Microsoft Learn
    Oct 31, 2022 · If you are using GetCurrentProcessId as an argument to this function, consider using GetCurrentProcess instead of OpenProcess, for improved ...
  70. [70]