CPU调度E
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1.First come first served
2.Shortest job/process first
3.Shortest remaining time next
4.Round robin (quantum=2)
5.Round robin (quantum=1)
6.Priority (1-high priority, preemptive)
7.Priority (1-high priority, non-preemptive)
Answer:
1.A:6B:11C:12D:13Mean turnaround time=(6+11+12+13)/4=42/4=10.5
2.A:6B:15C:5D:6Mean turnaround time=(6+15+5+6)/4=8
3.A:10B:15C:2D:3Mean turnaround time=(10+15+2+3)/4=7.5
4.A:10B:15C:5D:8Mean turnaround time=(10+15+5+8)/4=9.5
5.A:13B:15C:7D:8Mean turnaround time=(13+15+7+8)/4=8.25
6.A:13,B:7,C:12,D:13Mean turnaround time=(13+7+12+13)/4=11.25
7.A:6,B:11,C:12,D:13Mean turnaround time=(6+11+12+13)/4=10.5 For the processes listed in the following table, please write out the turnaround time of each process and the average turnaround time for the following algorithms. You must write out the computing course.
1.Shortest remaining time next
2.Round robin (quantum=3s, run in order A,B,C,D)
A turnaround time is 7s
B turnaround time is 20s
C turnaround time is 12s
D turnaround time is 3s
Average turnaround time = (7+20+12+3)/4=42/4=10.5s
A turnaround time is 13s
B turnaround time is 20s
C turnaround time is 18s
D turnaround time is 12s
Average turnaround time = (13+20+18+12)/4=63/4=15.75s
A turnaround time is 12s
B turnaround time is 8s
C turnaround time is 20s
D turnaround time is 15s
Average turnaround time = (12+8+20+15)/4=55/4=13.75s
For the processes listed in the following table, please write out the turnaround time of each process and the average turnaround time for the following algorithms. You must write out the computing course.
1.FCFS
2.Shortest remaining time next
3.Round robin (quantum=6s, run in order A,B,C,D)
A turnaround time is 5s
B turnaround time is 14s
C turnaround time is 22s
D turnaround time is 28s
Average turnaround time = (5+14+22+28)/4=69/4=17.25s
A turnaround time is 5s
B turnaround time is 28s
C turnaround time is 19s
D turnaround time is 11s
Average turnaround time = (5+28+19+11)/4=63/4=15.75s
A turnaround time is 5s
B turnaround time is 26s
C turnaround time is 28s
D turnaround time is 23s
Average turnaround time = (5+26+28+23)/4=82/4=20.5s
A turnaround time is 14s
B turnaround time is 9s
C turnaround time is 22s
D turnaround time is 28s
Average turnaround time = (14+9+22+28)/4=73/4=18.25s