词条 | Process identifier |
释义 |
In computing, the process identifier (normally referred to as the process ID or PID) is a number used by most operating system kernels—such as those of UNIX, macOS and Microsoft Windows—to uniquely identify an active process. 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 killing it altogether. Unix-like{{morefootnotes|section|date=October 2017}}In Unix-like operating systems, new processes are created by the There are two tasks with specially distinguished process IDs: swapper or sched has process ID 0 and is responsible for paging, and is actually part of the kernel rather than a normal user-mode process. Process ID 1 is usually the init 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 additional kernel components visible as 'processes', in which case PID 1 is actively reserved for the init process to maintain consistency with older systems. 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 macOS and HP-UX, 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.[1] On some systems, like MPE/iX, the lowest available PID is used, sometimes in an effort to minimize the number of process information kernel pages in memory. The current process ID is provided by a Under Linux, the maximum process ID is given by the pseudo-file Microsoft WindowsUnder Microsoft Windows operating systems, one can get the current process' ID using PidfileSome processes, for example, the moc music player and the MySQL daemon, write their PID to a documented file location, to allow other processes to look it up. See also
References1. ^{{citation |title=comp.unix.aix Frequently Asked Questions |url=http://www.faqs.org/faqs/aix-faq/part2/section-20.html |accessdate=2008-07-21}} {{FOLDOC}}{{DEFAULTSORT:Process Identifier}}2. ^{{citation |title=proc - process information pseudo-filesystem |work=Linux Programmer's Manual |url=http://www.tin.org/bin/man.cgi?section=5&topic=proc |accessdate=2009-12-28}} 3. ^{{citation |title=GetCurrentProcessId Function |publisher=Windows Developer Center |url=http://msdn.microsoft.com/en-us/library/ms683180(VS.85).aspx |accessdate=2009-05-20}} 4. ^{{citation |title=ProcessId Function |publisher=Windows Developer Center |url=http://msdn.microsoft.com/en-us/library/ms683215(v=vs.85).aspx |accessdate=2011-03-05}} 5. ^{{cite web|last=Chen|first=Raymond|title=Why are process and thread IDs multiples of four?|website=The Old New Thing|date=2008-02-28|publisher=MSDN Blogs|url=https://blogs.msdn.microsoft.com/oldnewthing/20080228-00/?p=23283|access-date=2016-11-11}} 1 : Process (computing) |
随便看 |
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。