Chapter 3Process Description and Control课件.ppt

  1. 1、本文档共56页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Two-State Process Model To control processes, we need to describe their behavior Process may be in one of two states Running Not-running 精品文档 Queuing Diagram Etc … processes moved by the dispatcher of the OS to the CPU then back to the queue until the task is competed Processes that are not running must be kept in some sort of queue, waiting their turn to execute. 精品文档 Process Birth and Death Common Reasons Creation Termination New batch job Normal Completion Interactive Login Memory unavailable Created by OS to provide a service Protection error Spawned by existing process Operator or OS Intervention See tables 3.1 and 3.2 for more 精品文档 Process Creation The OS builds a data structure to manage the process Traditionally, the OS creates all processes But it can be useful to let a running process create another, e.g., a server process may generate a new process for each request This action is called process spawning Parent Process is the original, creating process Child Process is the new process 精品文档 Process Termination There must be some way that a process can indicate completion. This indication may be: A HALT instruction for termination in a batch job A user action (e.g. log off, quitting an application) A fault or error Parent process terminating 精品文档 Five-State Process Model Processes may be blocked (e.g., waiting for an I/O operation) 精品文档 Using Two Queues 精品文档 Multiple Blocked Queues 精品文档 Suspended Processes Processor is faster than I/O, so all processes could be waiting for I/O Swap these processes to disk to free up more memory and use processor on more processes Blocked state becomes suspend state when swapped to disk 精品文档 One Suspend State 精品文档 Two Suspend States When the event of a suspended (and blocked) process occurs, the process is not blocked and is potentially available for execution. 精品文档 Process Suspension Common Reasons Reason Comment Swapping The OS needs to release sufficient main memory to bring in a process that is ready to execute. O

文档评论(0)

liuxiaoyu98 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档