In computer operating systems, a process (or task) may wait for another process to complete its execution. In most systems, a parent process can create an independently executing child process. The parent process may then issue a wait system call, which suspends the execution of the parent process while the child executes. When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process. The parent process then resumes execution.
Modern operating systems also provide system calls that allow a process's thread to create other threads and wait for them to terminate ("join" them) in a similar fashion.
An operating system may provide variations of the wait call that allow a process to wait for any of its child processes to exit, or to wait for a single specific child process (identified by its process ID) to exit.
Some operating systems issue a signal (SIGCHLD) to the parent process when a child process terminates, notifying the parent process and allowing it to retrieve the child process's exit status.
The exit status returned by a child process typically indicates whether the process terminated normally or abnormally. For normal termination, this status also includes the exit code (usually an integer value) that the process returned to the system. During the first 20 years of UNIX, only the low 8 bits of the exit code have been available to the waiting parent. In 1989 with SVR4, a new call waitid has been introduced that returns all bits from the exit call in a structure called siginfo_t in the structure member si_status. Waitid is a mandatory part of the POSIX standard since 2001.
When a child process terminates, it becomes a zombie process, and continues to exist as an entry in the system process table even though it is no longer an actively executing program. Under normal operation it will typically be immediately waited on by its parent, and then reaped by the system, reclaiming the resource (the process table entry).
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.
In computer operating systems, a process (or task) may wait for another process to complete its execution. In most systems, a parent process can create an independently executing child process. The parent process may then issue a wait system call, which suspends the execution of the parent process while the child executes. When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process. The parent process then resumes execution.
On many computer operating systems, a computer process terminates its execution by making an exit system call. More generally, an exit in a multithreading environment means that a thread of execution has stopped running. For resource management, the operating system reclaims resources (memory, , etc.) that were used by the process. The process is said to be a dead process after it terminates. Under Unix and Unix-like operating systems, a process is started when its parent process executes a fork system call.
L'identifiant de processus ou PID (Process IDentifier) est un code unique attribué sur les systèmes Unix ou Windows à tout processus lors de son démarrage. Il permet ainsi d'identifier le processus dans la plupart des commandes s'appliquant sur un processus donné (comme kill). Sous Linux le premier programme démarré, init, a le PID 1. Les processus suivants incrémentent le numéro pour arriver à 32768 par défaut sur les processeurs 32 bits, et 4194304 sur les processeurs 64 bits (réglable avec /proc/sys/kernel/pid_max) pour repartir de 2 en évitant les PID déjà utilisés.
Explore les mécanismes d'isolement dans les systèmes d'exploitation, en mettant l'accent sur la séparation des processus et l'isolation matérielle dans l'architecture x86.
Explore Junction, une nouvelle approche combinant le contournement du noyau et le multiplexage des ressources pour améliorer les performances du datacenter OS.