文档介绍:Chapter18–ProcessManagementOutline Introduction         ControllingProcessInputandOutput   munication   SignalHandling   (orprocess)operateinaseparatememoryspaceTimeslicingonsingle-–mandsonuser’sbehalfSomeoperatingsystemshavebuilt-mandsthatenableprogrammerstocreateandmanageprocesses((POSIX)mandsforUNIXoperatingsystems),pliantsystems,(creates)achildprocessEachprocesshasauniqueidentifyingprocessidnumber(pid)’sreturnvalue0forchildprocessChild’ (original)=()Parentprocess(forkPIDisChild’spid)Childprocess(forkPIDis0)#:#="parent"#onlytheparentisrunningnow910print"Programexecuting\n\tpid:%d,processName:%s"\11%((),processName)1213#attempttoforkchildprocess14try:15forkPID=()#createchildprocess16exceptOSError:("Unabletocreatenewprocess.")1819ifforkPID!=0:#amIparentprocess?20print"Parentexecuting\n"+\21"\tpid:%d