中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)04 CPU Scheduling

Chapter Objectives o To introduce CPU scheduling. o To describe various CPU-scheduling algorithms. o To discuss evaluation crieria for selecting a CPU-scheduling algorithm for a particular system. 口1⊙生年12月00 东香兰xanchen@ustc.edu.cn http:/staff..u011740i:Operating System操作系统原理斐 March27,20193/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter Objectives To introduce CPU scheduling. To describe various CPU-scheduling algorithms. To discuss evaluation crieria for selecting a CPU-scheduling algorithm for a particular system. 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 3 / 68

提纲一CPU scheduling Basic Concepts Scheduling Criteria 3 Scheduling Algorithms Multiple-Processor Scheduling 5 Real-Time Scheduling OS examples Algorithm Evaluation 8 小结 口18,走卡11月00 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 March27,20194/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 提纲——CPU scheduling 1 Basic Concepts 2 Scheduling Criteria 3 Scheduling Algorithms 4 Multiple-Processor Scheduling 5 Real-Time Scheduling 6 OS examples 7 Algorithm Evaluation 8 小结 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 4 / 68

Outline Basic Concepts CPU-1/O Burst Cycle CPU Scheduler o Preemptive Scheduling ●Dispatcher 口1⊙生年12月00 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 March27,20195/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline 1 Basic Concepts CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 5 / 68

Basic Concepts o Scheduling is a fundamental OS function. Almost all computer resources are scheduled before use. CPU scheduling is the basis of multiprogrammed OSes. Objective of multiprogramming o Maximum CPU utilization 口G¥4老年年色走QG 东香兰xlanchen@ustc,edu.cn http:/staff..u011740i:Operating System操作系统原理 March27,20196/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Concepts Scheduling is a fundamental OS function. ▶ Almost all computer resources are scheduled before use. ▶ CPU scheduling is the basis of multiprogrammed OSes. Objective of multiprogramming Maximum CPU utilization 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 6 / 68

Outline Basic Concepts CPU-1/O Burst Cycle o CPU Scheduler o Preemptive Scheduling o Dispatcher 口1⊙生年12月00 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 March27,20197/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline 1 Basic Concepts CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 7 / 68

Basic Concepts:CPU-I/O Burst Cycle oA property of process: CPU-1/O Burst Cycle Process execution consists of a load store cycle of CPU execution and I/O add store CPU burst read from file wait Alternating Sequence of CPU And wait for I/O I/O burst 1/O Bursts store increment index CPU burst o Begin and end with a CPU burst write to file ●Process execution wait for l/O l/O burst n(CPU execution l/O wait) load store +CPU execution add store CPU burst read from file wait for I/O 1/O burst EDao 陈话兰xlanchen@ustc.edu:cn http/staff.uO1174O1 Operating System操作系统原理 March27,20198/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Concepts: CPU-I/O Burst Cycle A property of process : CPU-I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait Alternating Sequence of CPU And I/O Bursts Begin and end with a CPU burst Process execution = n (CPU execution + I/O wait) + CPU execution ... load store add store read from file wait for I/O store increment index write to file wait for I/O load store add store read from file wait for I/O ... CPU burst I/O burst CPU burst I/O burst CPU burst I/O burst 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 8 / 68

CPU burst distribution 160 140 12 100 80 50 40 20 16 24 32 40 burst duration (milliseconds) Histogram of CPU-burst Times 东香兰xlanchen@ustc,edu.cn http:/staff..u0117401 Operating System操作系统原理 March27,20199/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CPU burst distribution 0 8 16 24 32 40 20 40 60 80 100 120 140 160 frequency burst duration (milliseconds) Histogram of CPU-burst Times 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 9 / 68

Outline Basic Concepts o CPU-1/O Burst Cycle o CPU Scheduler o Preemptive Scheduling o Dispatcher 口1⊙生年12月00 陈香兰xlanchen@ustc.edu:cn http:/staf.u01174oi:Operating System操作系统原理斐 March27.201910/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline 1 Basic Concepts CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 10 / 68

CPU Scheduler CPU scheduler(Short-term Scheduler) selects a process from the processes in memory that are ready to execute and allocates the CPU to the process o Ready Queue could be: a FIFO Queue? a priority queue? a tree? an unordered linked list? 口5,注,”12月0C 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 March27.201911/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CPU Scheduler CPU scheduler (Short-term Scheduler) selects a process from the processes in memory that are ready to execute and allocates the CPU to the process Ready Queue could be: ▶ a FIFO Queue? ▶ a priority queue? ▶ a tree? ▶ an unordered linked list? 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 11 / 68

Outline Basic Concepts 0 CPU-1/O Burst Cycle CPU Scheduler o Preemptive Scheduling o Dispatcher 口1⊙生年12月00 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 March27,201912/68
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline 1 Basic Concepts CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 27, 2019 12 / 68
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)03 Processes.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)02 OS Structure.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)01 CS Structure.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)01 OS overview.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)课程简介(主讲:陈香兰).pdf
- 中国科学技术大学:《高级操作系统 Advanced Operating System》课程教学资源(PPT课件讲稿)第二章 分布式路由算法(2/2).ppt
- 中国科学技术大学:《高级操作系统 Advanced Operating System》课程教学资源(PPT课件讲稿)第二章 分布式路由算法主要内容(1/2,主讲:陈香兰).ppt
- 天津开放大学:《电子商务概论》课程教学资源(试卷习题)综合练习及答案.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)计算机网络应用基础练习_第三章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)计算机安全练习_第七章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)计算机基础知识练习_第一章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)Word 2010文字处理系统练习_第四章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)Windows 7操作系统及应用练习_第二章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)PowerPoint 2010电子演示文稿系统练习_第六章.doc
- 国家开放大学:《计算机应用基础》课程教学资源(章节习题,含答案)Excel 2010电子表格系统练习_第五章.doc
- 国家开放大学:2016年秋季学期“开放专科”电子商务专业电子商务法律与法规期末试题(1月).pdf
- 国家开放大学:2016年秋季学期“开放专科”电子商务专业数据库基础期末试题(1月).pdf
- 国家开放大学:2016年秋季学期“开放专科”国际经济与贸易专业电子商务概论期末试题(开卷).pdf
- 国家开放大学:2016年春季学期“开放本科”计算机科学与技术专业软件工程期末试题(半开卷).pdf
- 国家开放大学:2016年春季学期“开放本科”计算机科学与技术专业计算机网络(本)期末试题(7月).pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)05 Threads.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)06 Process Synchronization.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)07 Deadlock.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)08 Main Memory.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)09 虚拟内存 Virtual Memory.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)10 文件系统接口 File System Interface.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)11 File 文件系统实现 File system implementation.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)12 外存 Mass Storage Systems.pdf
- 中国科学技术大学:《操作系统原理与设计 Operating System》课程教学资源(PPT课件讲稿)13 IO管理 IO systems.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)GNU开发工具链简介 GNU Tools(主讲:陈香兰).pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)基于x86的Linux启动代码分析.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)制作简单的Linux系统.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)内存寻址.ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux进程管理(1/3).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux进程管理(2/3).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)中断和异常.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)系统调用.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)Linux进程管理(3/3).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)内存管理.pdf
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(课件讲义)Linux中的时钟和定时测量.pdf