日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

7. CPU Scheduling

發布時間:2023/12/20 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 7. CPU Scheduling 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

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.

總結

以上是生活随笔為你收集整理的7. CPU Scheduling的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。