资源描述:
《design and implementation of the 4.4 bsd operating system part 2 [unix] (aw, 1996) mckusick外语英文电子书外语英文电子书》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、addressesusedforthereturnofresultsmustbevalidatedtoensurethattheyareidentifierofthechild,andonceinthechildprocess,wherethereturnvalueis0.partofanapplication'saddressspace.Ifthekernelencountersanerrorwhilepro-Theparent-childrelationshipinducesahierarchicalstructureonth
2、esetofpro-cessingasystemcall,itreturnsanerrorcodetotheuser.FortheCprogrammingcessesinthesystem.Thenewprocesssharesallitsparent'sresources,suchasfilelanguage,thiserrorcodeisstoredintheglobalvariableerrno,andthefunctiondescriptors,signal-handlingstatus,andmemorylayout.t
3、hatexecutedthesystemcallreturnsthevalue—1.AlthoughthereareoccasionswhenthenewprocessisintendedtobeacopyUserapplicationsandthekerneloperateindependentlyofeachother.4.4BSDoftheparent,theloadingandexecutionofadifferentprogramisamoreusefuldoesnotstoreI/Ocontrolblocksoroth
4、eroperating-system-relateddatastructuresandtypicalaction.Aprocesscanoverlayitselfwiththememoryimageofanotherintheapplication'saddressspace.Eachuser-levelapplicationisprovidedaninde-program,passingtothenewlycreatedimageasetofparameters,usingthesystempendentaddressspace
5、inwhichitexecutes.Thekernelmakesmoststatechanges,callexecve.Oneparameteristhenameofafilewhosecontentsareinaformatsuchassuspendingaprocesswhileanotherisrunning,invisibletotheprocessesrecognizedbythesystem—eitherabinary-executablefileorafilethatcausestheinvolved.executi
6、onofaspecifiedinterpreterprogramtoprocessitscontents.Aprocessmayterminatebyexecutinganexitsystemcall,sending8bitsofexitstatustoitsparent.Ifaprocesswantstocommunicatemorethanasingle2.4ProcessManagementbyteofinformationwithitsparent,itmusteithersetupaninterprocess-commu
7、ni-cationchannelusingpipesorsockets,oruseanintermediatefile.Interprocess4.4BSDsupportsamultitaskingenvironment.EachtaskorthreadofexecutioniscommunicationisdiscussedextensivelyinChapter11.termedaprocess.Thecontextofa4.4BSDprocessconsistsofuser-levelstate,Aprocesscansus
8、pendexecutionuntilanyofitschildprocessesterminateincludingthecontentsofitsaddressspaceandtherun-timeenvironment,andusingthew