Child Process
Process is a computer term that refers to an executing program. Put another way, a process is a means of allocating the resources of a computer system. A process executes a program. Multiple addresses can execute the same program, but each process has its own copy of the program and executes the copy independently of the other copies.
Processes are organized in a hierarchical manner, and this is where the term child process is germane. Each process has a parent process. The processes created by a parent are called its child processes. A child process relates to a program that is part of a computer's operating system that results from the execution of a program. When a user logs in to a system, the program that begins to run, often called the shell program, is the parent of all subsequent processes. Any processes that are started from within the shell--such as entering a comand--are the children of the initial process.
In a number of operating systems, a child process is created using a fork system call. The child process created by the fork process is an exact copy of its parent except that it has is own identifier.
Each process is identified by a process ID number. A unique ID is allocated to each process, both parent and child. For a child process to complete, the identifier number is freed and is reported to its parent.
A process may create any number of child processes. However, each child process has only one parent process (except for the very first process upon the start up of a computer, which has no parent). This first process, called init in the Unix operating language, starts up when the computer is started. The child process of this first process inherits parental attributes, such as open files.
In Unix and in other programming languages, the parent and child processes follow the same set of instructions. Each process, however, has its own set of variables (data). Because the parent and the child have different addresses, their programs can differ.
Having child processes enables concurrency to occur. Concurrency refers to a situation where two or more programs can execute at the same time. In the C programming language, using the fork system call, a child process is created from the parent. The processes are nearly identical, and so can function on different portions of the same program or on separate programs.
The parent and child processes communicate through the usual communication schemes--pipes, sockets, message queues, and shared memory--but they have special communication strategies based on their relationship as parent and child. For example, the parent is able to tell when a child process has ended.
This is the complete article, containing 442 words
(approx. 1 page at 300 words per page).