什么是子进程

来源:百度文库 编辑:神马文学网 时间:2024/07/04 20:23:26
Child Processes
Processes are the primitive units for allocation of systemresources. Each process has its own address space and (usually) onethread of control. A process executes a program; you can have multipleprocesses executing the same program, but each process has its own copyof the program within its own address space and executes itindependently of the other copies.
Processes are organized hierarchically. Each process has a parentprocess which explicitly arranged to create it. The processes createdby a given parent are called its child processes. A childinherits many of its attributes from the parent process.
This chapter describes how a program can create, terminate, and controlchild processes. Actually, there are three distinct operationsinvolved: creating a new child process, causing the new process toexecute a program, and coordinating the completion of the child processwith the original program.
The system function provides a simple, portable mechanism forrunning another program; it does all three steps automatically. If youneed more control over the details of how this is done, you can use theprimitive functions to do each step individually instead.
进程是分配系统资源的基本单位,进程执行一个程序,多个进程可执行同一个程序,但是它们的执行是相互独立的,有各自的进程空间。
一个进程可创建另外一个进程,那么它创建的这个进程是它的子进程。