文档介绍:Module 4: Processes进程
Process Concept
进程概念
Process Scheduling
进程调度
Operation on Processes
进程上的操作
Cooperating Processes
协同进程
munication
进程间通信
Applied Operating System Concepts
Process Concept进程概念
An operating system executes a variety of programs:
操作系统执行各种程序
Batch system – jobs 批处理系统- 作业
Time-shared systems – user programs or tasks
分时系统- 用户程序或任务
Textbook uses the terms job and process almost interchangeably. 本书使用的名词作业和进程,基本可互换
Process – a program in execution; process execution must progress in sequential fashion.
进程- 在执行中的程序;进程的执行必须以顺序方式进行
A process includes: 一个进程包括
program counter 程序计数器
stack 栈
data section 数据部分
Applied Operating System Concepts
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.
终止:进程执行完毕
Applied Operating System Concepts
Diagram of Process State进程状态图
Applied Operating System Concepts
Process Control Block (PCB)进程控制块
Information associated with each process.
同进程有关的信息
Process state 进程状态
Program counter 程序计数器
CPU registers CPU寄存器
CPU scheduling information CPU调度信息
Memory-management information内存管理信息
Accounting information 计账信息
I/O status information I/O状态信息
Applied Operating System Concepts
Process Control Block (PCB)进程控制块
Applied Operating System Concepts
CPU Switch From Process to Process进程间CPU的切换
Applied Operating System Concepts
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.
设备队列- 等待某一I/O设备的进程队列
Process migration between the various queues.
在各种队列之间进程的迁移
Applied Operating Sys