欢迎来到天天文库
浏览记录
ID:44205665
大小:79.00 KB
页数:9页
时间:2019-10-19
《1 Task-Process-Thread-Lighten_Thread》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、Task-Process-Thread-Lightweight_processMichaelLiProcess/Task(inUnix)Processestheexecutingprogramcode(oftencalledthetextsectioninUnix).asetofresourcesopenfilesandpendingsignalsinternalkerneldataprocessorstateanaddressspaceoneormorethreadsofexecutionadatasect
2、ioncontainingglobalvariablesThread(inUnix)Threadsaretheobjectsofactivitywithintheprocess.Eachthreadincludesauniqueprogramcounter(PC)processstack(SP)setofprocessorregisters()Thekernelschedulesindividualthreads,notprocesses.TraditionalUnixsystems,eachprocessc
3、onsistsofonethread.Modernsystems,however,multithreadedprogramsthosethatconsistofmorethanonethreadarecommon.Thread(inLinux)Linuxhasauniqueimplementationofthreads:Itdoesnotdifferentiatebetweenthreadsandprocesses.ToLinux,athreadisjustaspecialkindofprocess.kern
4、elthreadsstandardprocessesexistsolelyinkernel-space.Differencebetweenkernelthreadsandnormalprocesseskernelthreadsdonothaveanaddressspace(infact,theirmmpointerisNULL).Theyoperateonlyinkernel-spaceanddonotcontextswitchintouser-space.Kernelthreadsare,however,s
5、chedulableandpreemptableasnormalprocesses.Resourescanbesharedbyprocessesopenfilesandpendingsignals,addressspace,?????Resourcescanbesharedbythreadsopenfilesandpendingsignals,addressspace,???POSIX-compliantpthreadlibrariesthatuseLinux'slightweightprocessesLi
6、nuxThreadsIBM'sNextGenerationPosixThreadingPackage(NGPT)task_struct
此文档下载收益归作者所有