- 1、本文档共65页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
05 Linux应的用编程基础-1
* * Firstly, each process encapsulates an executable program, each having its own main() function as an entry point. Furthermore, each process has its own memory space, which is separate from the memory spaces of other processes running on the system. (This feat is accomplished through hardware called the Memory Management Unit, and will not be discussed here.) * * * * pstree命令: 列出 当前进程以及他们的树形结构. STAT : S Sleeping. Usually waiting for an event to occur, such as a signal or input to become available. R Running. Strictly speaking, “runnable,” that is, on the run queue either executing or about to run. D Uninterruptible Sleep (Waiting). Usually waiting for input or output to complete. T Stopped. Usually stopped by shell job control or the process is under the control of a debugger. Z Defunct or “zombie” process. N Low priority task, “nice.” W Paging. (Not for Linux kernel 2.6 onwards.) s Process is a session leader. + Process is in the foreground process group. l Process is multithreaded. High priority task * * 练习: we@we:~/test$ ps PID TTY TIME CMD 1898 pts/2 00:00:00 bash 2773 pts/2 00:00:00 ps we@we:~/test$ ls /proc/1898/cwd * * * * 子进程结束后,它与父进程的关系仍然维持,一直到父进程正常结束或调用exit()函数退出。在此之前,它仍然呆在任务表中,其退出码仍然等待父进程查询。倘若父进程异常退出,则子进程立即成为INIT(PID=1)的子进程,等待INIT将其从任务表中清除。 * * * 子进程结束后,它与父进程的关系仍然维持,一直到父进程正常结束或调用exit()函数退出。在此之前,它仍然呆在任务表中,其退出码仍然等待父进程查询。倘若父进程异常退出,则子进程立即成为INIT(PID=1)的子进程,等待INIT将其从任务表中清除。 Using fork to create processes can be very useful, but you must keep track of child processes. When a child process terminates, an association with its parent survives until the parent in turn either terminates normally or calls wait. The child process entry in the process table is therefore not freed up immediately. Although no longer active, the child process is still in the system because its exit code needs to be stored in case the parent subsequently calls wait. It becomes what is known as defunct, or a zombie process. If the parent then terminates abnormally,
您可能关注的文档
- !微机原理讲的义(第15章总线技术).ppt
- !微机原理讲义(第5章计算机和外设的数据传输W的6).ppt
- ((人教的版))[[初三物理课件]]2008年初三物理《电学》复习ppt课件.ppt
- (TSG2011)防爆电梯年度自行的检查报告.doc
- (上下标正确-可直接打印)高中化学物质的状态和颜色·常见物质的颜色、俗名、用途总汇.doc
- (教育科学出版社)六的年级下册科学教案.doc
- (模拟)南疆四地州乡村教师教学信息的化应用培训考试试题及答案.docx
- (推的荐)压力表校验课件.ppt
- (江苏金的陵中学物理名师工作室)基于《力的分解》教学的评课要点——朱建廉(共26张PPT).ppt
- (的OK)第11章 文件.ppt
- 教科版(2017秋)科学二年级上册2.6 做一顶帽子 教学设计.docx
- 河北高频考点专训四 质量守恒定律的应用教学设计---2024-2025学年九年级化学人教版(2024)上册.docx
- 大单元教学【核心素养目标】6.3 24时计时法教学设计 人教版三年级下册.docx
- 河南省商城县李集中学2023-2024学年下学期九年级历史中考模拟八(讲评教学设计).docx
- 第18章 第25课时 正方形的性质2023-2024学年八年级下册数学课时分层作业教学设计( 人教版).docx
- Module 8 模块测试 教学设计 2024-2025学年英语外研版八年级上册.docx
- 2024-2025学年小学数学五年级下册浙教版教学设计合集.docx
- 2024-2025学年小学劳动四年级下册人民版《劳动》(2022)教学设计合集.docx
- 2024-2025学年小学数学三年级上册冀教版(2024)教学设计合集.docx
- 2024-2025学年高中生物学必修1《分子与细胞》人教版教学设计合集.docx
文档评论(0)