《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 6 Process Scheduling

OperatingSystemsCh6Process Scheduling1
Operating Systems Ch6 Process Scheduling 1

OutlineUserSpaceProcessProcessProcessKernelSpaceSchedulingAlgProcessSchedulellifecycle11ProcessCommunication&ProcessSchedulingSynchronizationntelContext-Core"i7switching
Outline 2 Process Communication & Synchronization Process Scheduling Scheduler Contextswitching Process Process Process Kernel Space User Space P P P Scheduling Alg Process lifecycle

Whyschedulingis needed· Process execution-Consistsof acycleof CPUexecutionand I/OwaitCPU burst +I/o burst160140120CPUburstdurationKouenbauy100806040200164082432burstduration (milliseconds)3
Why scheduling is needed • Process execution – Consists of a cycle of CPU execution and I/O wait – CPU burst + I/O burst 3 CPU burst duration

Why scheduling is neededQuestion.Howto improveCPUMultiprogrammingutilization(CPUismuchfasterthanI/O)?MultitaskingQuestion.Howtoimprovesystemresponsiveness (interactiveapplications)?A system may contain many processes which are at differentstates (ready for running, waiting for I/O)Scheduling is required because the number of computingresource-the CPU-islimited4
Why scheduling is needed 4 A system may contain many processes which are at different states (ready for running, waiting for I/O) Multiprogramming Question. How to improve CPU utilization (CPU is much faster than I/O)? Question. How to improve system responsiveness (interactive applications)? Multitasking Scheduling is required because the number of computing resource – the CPU – is limited

Topics- Process lifecycle- Process scheduling- Context switching- Scheduling criteria- Scheduling algorithms: Applications/Scenarios(intel)Core"i75
5 Topics - Process lifecycle - Process scheduling - Context switching - Scheduling criteria - Scheduling algorithms - Applications/Scenarios

Topics- Process lifecycleProcess schedulingContext switchingScheduling criteriaScheduling algorithmsApplications/Scenarios(intel)Core"i76
6 Topics - Process lifecycle - Process scheduling - Context switching - Scheduling criteria - Scheduling algorithms - Applications/Scenarios

Programmer'spointofview.. This is how a fresh programmer looks at a processlife cycle.int main(void)(3)intx=1;Runninggetchar();Terminationreturnx;(1)(2)Waitingfor resultsProcessStates
Programmer’s point of view. • This is how a fresh programmer looks at a process’ life cycle. 7 Running Waiting for results Termination Process States int main(void) { int x = 1; getchar(); return x; } (1) (2) (3)

Kernel's point of view..Big PictureNewTerminated(Justfork()-ed)(Zombie)ReadyRunningWaiting(blocked)ProcessStates8
Kernel’s point of view. 8 New (Just fork()-ed) Waiting (blocked) Terminated (Zombie) Process States Ready Running Big Picture

Kernel's point of view..The birth of aprocess.Exceptthefirstprocess"init"every process is created usingNewTerminatedfork().ReadyRunningWaiting(blocked)ProcessStates9
Kernel’s point of view. 9 Process States Ready Running The birth of a process. Except the first process “init”, every process is created using fork(). New Waiting (blocked) Terminated

Kernel's point of view..TheprocessisreadyIt means it is ready to run but is notrunningNewA process may become"ready" after...- it is just created by fork();- it has been running on the CPUforsometimeandtheOS choosesReadyanotherprocessto run;-returningfromblockedstates.All ready processes are kept on a listWait.called ready queuePCBTPCBzqueueheaderProcessheadreadyqueuetailStatesregistersregisters10
Kernel’s point of view. 10 Process States Ready Running New Waiting (blocked) Terminated The process is ready. It means it is ready to run but is not running. A process may become “ready” after. - it is just created by fork(); - it has been running on the CPU for some time and the OS chooses another process to run; - returning from blocked states. All ready processes are kept on a list called ready queue
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 5 Process Communication & Synchronization -Part 2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 5 Process Communication & Synchronization(part1).pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 4 Threads.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 3 Process Concepts & Operations(part2)from Kernel's Perspective.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 3 Process Concepts & Operations(part1).pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 2 Operating System Structures.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 1 Overview of an Operating System.pdf
- 《计算机网络》课程教学资源(PPT课件)第六章 应用层.pptx
- 《计算机网络》课程教学资源(PPT课件)第五章 传输层.pptx
- 《计算机网络》课程教学资源(PPT课件)第四章 网络层.pptx
- 《计算机网络》课程教学资源(PPT课件)第三章 数据链路层.pptx
- 《计算机网络》课程教学资源(PPT课件)第二章 物理层.pptx
- 《计算机网络》课程教学资源(PPT课件)第一章 概述.pptx
- 《智能算法设计与应用》课程教学大纲 Intelligent Algorithm Design and Application.docx
- 《数字导航技术》课程教学资源(书籍文献)计算机视觉-马颂德.pdf
- 《C语言程序设计》课程参考文献:Programming languages — C(PDF电子书,英文版).pdf
- 《操作系统》课程教学资源(PPT课件)课程简介 Operating System.pptx
- 《操作系统》课程教学资源(PPT课件)第1章 操作系统引论.pptx
- 《操作系统》课程教学资源(PPT课件)第2章 进程的描述和控制.pptx
- 《操作系统》课程教学资源(PPT课件)第3章 处理机调度与死锁.pptx
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 7 Memory Management part1.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 7 Memory Management part2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 8 Mass Storage.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 9 File Systems part1.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 9 File Systems part2.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 10 Details of FAT32.pdf
- 《操作系统原理与设计 Operating System Principles and Implementation》课程教学课件(英文讲稿)Chapter 10 Details of Ext2/3 File System.pdf
- 北京工业大学:信息科学技术学院《C#程序设计基础》课程教学大纲 Fundamentals of Programming Principle and Practice in C#.pdf
- 北京工业大学:计算机学院本科课程教学大纲汇编(2024).pdf
- 揭阳职业技术学院:《计算机应用基础》课程授课教案(讲义,2025).pdf
- 《C语言程序设计》课程教学课件(PPT讲稿)第10章 对文件的输入输出.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第01章 程序设计和C语言.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第02章 算法——程序的灵魂.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第03章 最简单的C程序设计——顺序程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第04章 选择结构程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第05章 循环结构程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第06章 利用数组处理批量数据.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第07章 用函数实现模块化程序设计.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第08章 善于利用指针.pptx
- 《C语言程序设计》课程教学课件(PPT讲稿)第09章 用户自己建立数据类型.pptx
