CPU Scheduling

 

进程的执行由CPU执行和I/O等待的周期组成。
Process execution consists of a circle of CPU execution and I/O wait.

抢占式调度也会产生一些问题,比如对共享数据的访问。
Consider the case of two processed sharing data. One may be in the midst of updating the data, when it is preempted and the second process is run. The second process may try to read the data, which are currently in an inconsistent state. New mechanisms thus are needed to coordinate access to shared data.

衡量CPU调度的标准:
CPU
利用率、吞吐量、周转时间、等待时间、响应时间。
我们都希望CPU利用率和吞吐量最大,同时周转时间、等待时间、响应时间最小。

调度算法:
1. First-Come, First-Served Scheduling
(先到先服务)FCFS

它是最简单的调度算法,但时间较长,而且易使短的进程等待非常长的进程。

2. Shortest-Job-First Scheduling(最短作业优先)SJF

 它被认为是最佳的,因为其提供了最短平均等待时间。

3. Priority Scheduling(优先权调度)

4. Round-Robin Scheduling (轮转法)

5. Multilevel Queue Scheduling(多级队列调度)

6. Multilevel Feedback Queue Scheduling(多级反馈队列调度)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值