0. 文件地址

Homework

1. Workload Assumptions

在这里插入图片描述

2. Scheduling Metrics

在这里插入图片描述
在这里插入图片描述

3. First In, First Out (FIFO)

在这里插入图片描述

4. Shortest Job First (SJF)

在这里插入图片描述

5. Shortest Time-to-Completion First (STCF)

在这里插入图片描述
在这里插入图片描述

6. A New Metric: Response Time

在这里插入图片描述

7. Round Robin

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

8. Incorporating I/O

在这里插入图片描述

9. Homework (Simulation)

在这里插入图片描述

Question & Answer

在这里插入图片描述

1. Compute the response time and turnaround time when running three jobs of length 200 with the SJF and FIFO schedulers

FIFO:

在这里插入图片描述
在这里插入图片描述

SJF:

在这里插入图片描述
在这里插入图片描述

2. Now do the same but with jobs of different lengths: 100, 200, and 300.

2.1

FIFO: 100 200 300
在这里插入图片描述
在这里插入图片描述

SJF: 100 200 300
在这里插入图片描述
在这里插入图片描述

2.2

FIFO: 300 200 100
在这里插入图片描述
在这里插入图片描述
SJF: 300 200 100
在这里插入图片描述
在这里插入图片描述

3. Now do the same, but also with the RR scheduler and a time-slice of 1.

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

4. For what types of workloads does SJF deliver the same turnaround times as FIFO?

When the workload doesn’t arrive from large to small.

5. For what types of workloads and quantum lengths does SJF deliver the same response times as RR?

The RR scheduling strategy is to execute a time slice in sequence in the job list, let the length of the time slice be T, then the response time of the Nth job is (N-1) * T, and SJF needs to finish one job before executing another job. Therefore, the execution time of each job of the SJF strategy should be equal to the time slice of the RR strategy.

6.What happens to response time with SJF as job lengths increase? Can you use the simulator to demonstrate the trend?

When the job length increases, the waiting response time for subsequent jobs will increase accordingly.

在这里插入图片描述
在这里插入图片描述

7. What happens to response time with RR as quantum lengths increase? Can you write an equation that gives the worst-case response time, given N jobs?

Assuming the length of the time slice is T, the response time of the Nth job = (N – 1)* T.
When the quantum lengths increase, the response time will increase accordingly.

原文地址:http://www.cnblogs.com/astralcon/p/16792683.html

1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长! 2. 分享目的仅供大家学习和交流,请务用于商业用途! 3. 如果你也有好源码或者教程,可以到用户中心发布,分享有积分奖励和额外收入! 4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解! 5. 如有链接无法下载、失效或广告,请联系管理员处理! 6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需! 7. 如遇到加密压缩包,默认解压密码为"gltf",如遇到无法解压的请联系管理员! 8. 因为资源和程序源码均为可复制品,所以不支持任何理由的退款兑现,请斟酌后支付下载 声明:如果标题没有注明"已测试"或者"测试可用"等字样的资源源码均未经过站长测试.特别注意没有标注的源码不保证任何可用性