- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Processes and Threads 进程和线程 2.1 进程 2.2 进程间通信 2.3 经典IPC问题 2.4 线程 2.5 调度 Emphases(本章重点) Process (进程) Process states(进程状态) Semaphore(信号量) Scheduling(调度) 试题类型 进程及其状态相关概念选择填空 用信号量描述生产者消费者或读者写者问题程序填空 调度的相关计算 Processes and Threads 2.1 process Multi-programming system: Some programs were loaded in main memory, the CPU switch from program to program. Pseudo-parallelism to contrast with the true hardware parallelism of multiprocessor systems Multi-processor: true hardware parallelism The Process Model 2.1.1 process model (a)Multiprogramming of four programs (b)Conceptual model of 4 independent, sequential processes (abstract) (c)Only one program active at any instant Processes and program Process: A program is executed by CPU for the data sets: A key idea here is that a process is an activity of some kind. It has a program, input , output and a state Distinguish between process and program Dynamic and Static (most important) Temporarily and Always Process Creation 2.1.2 process creation Principal events that cause process creation: System initialization Execution of a process creation system User request to create a new process Initiation of a batch job (mainframe) Technically, in all these cases, a new process is created by having a existed process execute a process creation system call : UNIX:fork,/WIN32: Create Process Process Termination 2.1.3 process termination Conditions which terminate processes: Normal exit (voluntary): they have done their work Error exit (voluntary): for example, no file exists Fatal error (involuntary): for example, dividing by zero Killed by another process (involuntary): executes a system call telling OS to do this Process Hierarchies 2.1.4 Process Hierarchies In some systems , when a process creates another process , the parent process and child process continue to be associated in certain ways, the child process can itself create more processes, forming a process hierarchy Unix has the concept o
文档评论(0)