上海交通大学:《现代操作系统》课程教学资源(PPT课件讲稿)Chapter 02 进程与线程 Process and Thread

斗★ ★长 Chapter 2: Process/Thread ★★ Instructor. HengmingZou, Ph. D n Pursuit of absolute Simplicity求于至简,归于永恒
1 Chapter 2: Process/Thread Instructor: Hengming Zou, Ph.D. In Pursuit of Absolute Simplicity 求于至简,归于永恒

★ Content ¥ 斗 ★★ ≈ Processes s Threads o Inter-process communication o Classical IPC problems o Scheduling
2 Content Processes Threads Inter-process communication Classical IPC problems Scheduling

★ Definition of a process ¥ 斗 ★★ s Informal A prog amin execution A runningpiece of codealongwith all the things the progam can read/write ≈Foma One or more threadsin their own addressspace o Note that process!= program
3 Definition of A Process Informal – A program in execution – A running piece of code along with all the things the program can read/write Formal – One or more threads in their own address space Note that process != program

★ The need for process ¥ 斗 ★★ o What is the priniple motivation for inventing process Tosupportmultiprogamming
4 The Need for Process What is the principle motivation for inventing process? – To support multiprogramming

★ The Process model ¥ 斗 ★★ o Conceptual viewing of the processes o Concurrency Multiple processesseemto run conaumently But in reality only one activeatany instant s Progress Every processmakes progress
5 The Process Model Conceptual viewing of the processes Concurrency – Multiple processes seem to run concurrently – But in reality only one active at any instant Progress – Every process makes progress

★ Multiprogrammingof 4 programs ¥ ★ One program counter Four program counters AProcess switch B A B D B D Time Programs in memory Conceptual view Time line view
6 Programs in memory Conceptual view Time line view Multiprogramming of 4 programs

★ Process Creation ¥ 斗 ★★ Principal events that cause process creation 1. System initialization 2. Execution of a process creation system 3. User request to create a new process
7 Process Creation Principal events that cause process creation 1. System initialization 2. Execution of a process creation system 3. User request to create a new process

★ Process Temination ¥ 斗 ★★ Conditionswhich teminate processes 1. Nomal exit(voluntary) 2. Error exit(voluntary) 3. Fatal error(involuntary) 4. Killed by another process (involuntary)
8 Process Termination Conditions which terminate processes 1. Normal exit (voluntary) 2. Error exit (voluntary) 3. Fatal error (involuntary) 4. Killed by another process (involuntary)

★ Process hierarchies ¥ 斗 ★★ o Parent creates a child process o Child processes can create its own process o Processes creation foms a hierarchy UNdX callsthis a"processgroup Windowshasno concept of such hierarchy, i.e. all processesare createdequal
9 Process Hierarchies Parent creates a child process Child processes can create its own process Processes creation forms a hierarchy – UNIX calls this a "process group" – Windows has no concept of such hierarchy, i.e. all processes are created equal

★ Process states ¥ 斗 ★★ o Possible process states running blocked read Running Process blocks Scheduler picks for input another process Scheduler picks this process Blocked Ready Input becomes available
10 Process States Running Blocked Ready Possible process states – running, blocked, ready Process blocks for input Scheduler picks another process Input becomes available Scheduler picks this process
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 上海交通大学:《程序设计》课程教学资源(PPT课件讲稿)第5章 批量数据处理——数组.ppt
- 上海交通大学:Scheduling Algorithms in Heterogeneous Computing Systems.pptx
- 北京理工大学:《软件工程基础》课程教学资源(PPT课件讲稿)需求工程(主讲:刘驰).ppt
- 《计算机图形学》课程教学资源(PPT课件讲稿)Chapter 4 Graphics Output Primitives(Part II).pptx
- 亚马逊云计算AWS(Amazon Web Service)、Cloud Computing——Cassandra.ppt
- 上海交通大学:《通信网络》课程PPT教学课件(讲稿)Communication Networks - ANALYSIS OF 10G EEE PROTOCOL.pptx
- 上海交通大学:《Multicore Architecture and Parallel Computing》课程教学资源(PPT课件讲稿)Lecture 7 CUDA.ppt
- 上海交通大学:云安全(PPT讲稿)Cloud Security.pptx
- 局域网的硬件设备和操作系统(PPT讲稿).ppt
- 大数据分析(PPT讲稿)大数据引领我们走向数据智能化时代.ppt
- 淮阴工学院:《数据库原理》课程教学资源(PPT课件讲稿)第3章 关系数据库的基本理论.ppt
- 《Java面向对象程序设计》课程教学资源(PPT课件讲稿)第三章 Java面向对象编程.pptx
- 《Java面向对象程序设计》课程教学资源(PPT课件讲稿)第六章 Java输入输出流与文件操作.pptx
- 《Java面向对象程序设计》课程教学课件(PPT讲稿)流程控制语句.pptx
- 《Java面向对象程序设计》课程教学课件(PPT讲稿)AWT和Swing组件.pptx
- 江苏海洋大学(淮海工学院):《Java面向对象程序设计》课程教学资源(PPT课件讲稿)第4章 Java图形用户界面设计.pptx
- 江苏海洋大学(淮海工学院):《Java面向对象程序设计》课程教学资源(PPT课件讲稿)第2章 Java语言基础.pptx
- 《Java面向对象程序设计》课程教学资源(PPT课件讲稿)第四章 Java图形用户界面设计 4.2 AWT和Swing组件.pptx
- 《高级语言程序设计 Advanced Programming》课程教学资源(PPT课件讲稿)第8章 指针.ppt
- 《C语言程序设计》课程教学资源(PPT课件讲稿)第5章 循环结构程序设计.ppt
- 《数据库基础与应用》课程PPT教学课件(Access案例教程)第9章 数据库语言SQL.pptx
- 《数据库基础与应用》课程PPT教学课件(Access案例教程)第8章 宏.pptx
- 《数据库基础与Access应用》课程教学资源(PPT课件)第12章 应用实例.pptx
- 《数字图像处理基础》课程教学资源(教学大纲.pdf
- 长安大学:《微机原理》课程教学资源(PPT课件讲稿)第7章 汇编语言程序设计.pptx
- 西安交通大学:《微型计算机接口技术》课程教学资源(PPT课件讲稿)第二章 微型处理器与单片机.ppt
- 中国铁道出版社:《局域网技术与组网工程》课程教学资源(PPT课件讲稿)第7章 网络系统集成与网络维护.ppt
- 《计算机应用基础》课程教学资源(PPT课件讲稿)第3章 Word 2007文字处理.ppt
- 《微机原理》课程教学资源(PPT课件)第六章 微型计算机的输入/输出.ppt
- 《单片机原理及应用》课程教学资源(PPT课件)第8章 AT89S51单片机外部存储器的扩展.ppt
- 《网页设计与制作》课程教学资源(PPT课件讲稿)第七章 模板与库的应用.ppt
- 《网页设计与制作》课程教学资源(PPT课件讲稿)第四章 设计页面布局.ppt
- 《微机原理》课程教学资源(PPT课件)第2章 微处理器与总线.ppt
- 山东大学:《微机原理及单片机接口技术》课程教学资源(PPT课件讲稿)第四章 指令系统及汇编语言程序设计 4.5 各类指令详解.ppt
- 多媒体图像处理技术(PPT课件讲稿,共六章).ppt
- 山东大学:《人机交互技术》课程教学资源(PPT课件讲稿)第9章 可用性分析与评估.ppt
- 《C++语言程序设计》课程教学课件(PPT讲稿)第13讲 多态.ppt
- 《计算机组成原理》课程教学资源(PPT课件讲稿)第八章 I/O操作的实现.ppt
- 《编译原理》课程教学资源(PPT课件讲稿)第七章 语义分析和中间代码生成.ppt
- 山东大学计算机科学与技术学院:Web Service(PPT讲稿).ppt