操作系统概念(第七版英文版)ch3精品PPT课件
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Chapter 3: Processes
Chapter 3: Processes
Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems
Textbook uses the terms job and process almost interchangeably Process – a program in execution; process execution must progress in sequential fashion A process includes:
Operating System Concepts - 7th Edition, Feb 7, 2006
3.2
Silberschatz, Galvin and Gagne ©2005
Process Concept
An operating system executes a variety of programs: Batch system – jobs Time-shared systems – user programs or tasks
Operating System Concepts - 7th Edition, Feb 7, 2006
3.13
ຫໍສະໝຸດ Baidu
Silberschatz, Galvin and Gagne ©2005
Schedulers (Cont.)
Short-term scheduler is invoked very frequently (milliseconds) (must be fast) Long-term scheduler is invoked very infrequently (seconds, minutes) (may be slow) The long-term scheduler controls the degree of multiprogramming Processes can be described as either:
program counter stack data section heap
Operating System Concepts - 7th Edition, Feb 7, 2006
3.3
Silberschatz, Galvin and Gagne ©2005
Process State
As a process executes, it changes state new: The process is being created running: Instructions are being executed waiting: The process is waiting for some event to occur ready: The process is waiting to be assigned to a processor terminated: The process has finished execution
Operating System Concepts - 7th Edition, Feb 7, 2006
3.10
Silberschatz, Galvin and Gagne ©2005
Representation of Process Scheduling
Operating System Concepts - 7th Edition, Feb 7, 2006
Operating System Concepts - 7th Edition, Feb 7, 2006
3.7
pointer
Silberschatz, Galvin and Gagne ©2005
CPU Switch From Process to Process
Operating System Concepts - 7th Edition, Feb 7, 2006
3.9
Silberschatz, Galvin and Gagne ©2005
Process Scheduling Queues
Job queue – set of all processes in the system Ready queue – set of all processes residing in main memory, ready and waiting to execute Device queues – set of processes waiting for an I/O device Processes migrate among the various queues
3.12
Silberschatz, Galvin and Gagne ©2005
Schedulers
Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU
Operating System Concepts - 7th Edition, Feb 7, 2006
3.5
Silberschatz, Galvin and Gagne ©2005
Process Control Block (PCB)
Information associated with each process Process state Program counter CPU registers CPU scheduling information Memory-management information Accounting information I/O status information
Chapter 3: Processes
Process Concept Process Scheduling Operations on Processes Cooperating Processes Interprocess Communication Communication in Client-Server Systems
Textbook uses the terms job and process almost interchangeably Process – a program in execution; process execution must progress in sequential fashion A process includes:
Operating System Concepts - 7th Edition, Feb 7, 2006
3.2
Silberschatz, Galvin and Gagne ©2005
Process Concept
An operating system executes a variety of programs: Batch system – jobs Time-shared systems – user programs or tasks
Operating System Concepts - 7th Edition, Feb 7, 2006
3.13
ຫໍສະໝຸດ Baidu
Silberschatz, Galvin and Gagne ©2005
Schedulers (Cont.)
Short-term scheduler is invoked very frequently (milliseconds) (must be fast) Long-term scheduler is invoked very infrequently (seconds, minutes) (may be slow) The long-term scheduler controls the degree of multiprogramming Processes can be described as either:
program counter stack data section heap
Operating System Concepts - 7th Edition, Feb 7, 2006
3.3
Silberschatz, Galvin and Gagne ©2005
Process State
As a process executes, it changes state new: The process is being created running: Instructions are being executed waiting: The process is waiting for some event to occur ready: The process is waiting to be assigned to a processor terminated: The process has finished execution
Operating System Concepts - 7th Edition, Feb 7, 2006
3.10
Silberschatz, Galvin and Gagne ©2005
Representation of Process Scheduling
Operating System Concepts - 7th Edition, Feb 7, 2006
Operating System Concepts - 7th Edition, Feb 7, 2006
3.7
pointer
Silberschatz, Galvin and Gagne ©2005
CPU Switch From Process to Process
Operating System Concepts - 7th Edition, Feb 7, 2006
3.9
Silberschatz, Galvin and Gagne ©2005
Process Scheduling Queues
Job queue – set of all processes in the system Ready queue – set of all processes residing in main memory, ready and waiting to execute Device queues – set of processes waiting for an I/O device Processes migrate among the various queues
3.12
Silberschatz, Galvin and Gagne ©2005
Schedulers
Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU
Operating System Concepts - 7th Edition, Feb 7, 2006
3.5
Silberschatz, Galvin and Gagne ©2005
Process Control Block (PCB)
Information associated with each process Process state Program counter CPU registers CPU scheduling information Memory-management information Accounting information I/O status information