网站大量收购独家精品文档,联系QQ:2885784924

第六讲 CPU的调度.ppt

  1. 1、本文档共33页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第六讲 CPU的调度

第六讲 CPU的调度 Basic Concepts 基本概念 Scheduling Criteria 调度程序的评价标准 Scheduling Algorithms 调度算法 Multiple-Processor Scheduling 多处理机的调度 Real-Time Scheduling 实时调度 Algorithm Evaluation 算法评价 Basic Concepts 基本概念 Maximum CPU utilization obtained with multiprogramming 进程调度的目的是要使采用多道程序设计的技术后将CPU的利用率最大化。 CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait. CPU和I/O操作段的周期-进程的执行由CPU的执行和等待I/O操作的周期组成的。 CPU burst distribution 进程的调度就是如何为CPU的运行段分配资源。 Alternating Sequence of CPU And I/O Bursts Histogram of CPU-burst Times CPU Scheduler CPU调度程序 Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them. 在就绪的进程中选择一个进程执行,并分配CPU CPU scheduling decisions may take place when a process:需要做CPU调度决策的时机: 1. Switches from running to waiting state. 当进程从运行状态转入等待状态时; 2. Switches from running to ready state.当进程从运行状态转入就绪状态时; 3. Switches from waiting to ready.当进程从等待状态转入就绪状态时; 4. Terminates. 进程终止时 Scheduling under 1 and 4 is nonpreemptive. 情形1和4是非抢夺的调度,其它情形是抢夺的调度 All other scheduling is preemptive. Dispatcher 分派 Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this involves:分派模块将CPU的控制权交给CPU调度程序选择的进程,分派操作的内容: switching context 上下文的切换 switching to user mode 切换到用户模式 jumping to the proper location in the user program to restart that program 跳转到用户程序的相应的位置,并启动用户程序的执行 Dispatch latency – time it takes for the dispatcher to stop one process and start another running. 分派时间-分派程序停止一个进程的执行到启动另一个进程的时间。 Scheduling Criteria 进程调度的评价标准 CPU utilization – keep the CPU as busy as possible (CPU利用率-尽可能使CPU处于忙的状态) Throughput – # of processes that complete their execution per time unit(吞吐率-单位时间完成的进程数) Turnaround time – amount of time to execute a particular process(完成时间-完成一个特定的进程执行的时间) Waiting time – amount of time a process has been waiting in the ready queue(等待时间-进程在就绪队列中等待的时间) Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (f

文档评论(0)

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

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

1亿VIP精品文档

相关文档