对象:外存中因暂时不能运行而被挂起的进程 动作:将外存挂起的进程激活调入内存,进入就绪队列 目的:提高内存利用率
New
Ready Activate Suspend
Suspend
Ready
Timeout Running Release
Event Occurs Event Occurs
Blocked Suspend
可见,采用短作业优先调度算法可获得最小平均作业周转时间
练习
假定有四道作业,它们的进入时间和运行时间在下表中给出:
作业号
1 2 3 4
进入时间(时)
10:00 10:10 10:20 10:30
运行时间(分钟)
40 60 30 20
在单道程序环境下,分别采用FCFS和SJF算法,试说明他们的 调度顺序及平均周转时间
从OS类型:批处理、分时、实时、多处理机调度 从调度层次:高级调度、低级调度、中级调度
(1)高级调度 作业调度 long-term scheduling
• Determines which programs are admitted to the system for processing • Controls the degree of multiprogramming • More processes, smaller percentage of time each process is executed
3) 优先权调度算法(Priority Scheduling)
High Priority First——HPF
为照顾紧迫型作业的执行而引入,分为非 抢先式和抢先式。
静态优先权 动态优先权
静态优先权
优先权在创建进程时就确定,直到进程终止前都不改变,通 常是一个整数。