操作系统第3次作业
5页1、操作系统第3次作业n 1. A CPU scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled on one processor, how many possible different schedules are there? Give a formula in terms of n. 答:共有n!=n*(n-1)*(n-2)*1种不同调度方法。 n 2. Define the difference between preemptive and nonpreemptive scheduling. State why strict nonpreemptive scheduling is unlikely to be used in a computer center. 答:非抢占式调度:一旦CPU被分配给一个进程,那么该进程会一直使用CPU直到进程终止或切换到等待状态时主动释放CPU。 可抢占式调度:当
2、一个进程在CPU上运行时,该程序的CPU使用权可以被另一个新进程剥夺,被抢占的程序的状态被保存在PCB中,并进入就绪队列,等待下一次运行。 如果一个系统采用的是非可抢占式调度,并采用优先级调度,那么优先级比较低的进程可能永远都在等待被执行,造成饥饿。这种情况就需要采用老化技术来防止饥饿。因此一个计算机中心最好不要采用严格的非抢占式调度。 n 3. Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: n The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. n a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a nonpreemptive priority (a smaller prio
3、rity number implies a higher priority), and RR (quantum = 1) scheduling. n b. What is the turnaround time of each process for each of the scheduling algorithms in part a? n c. What is the waiting time of each process for each of the scheduling algorithms in part a? n d. Which of the schedules in part a results in the minimal average waiting time (over all processes)? FCFS P1 答:a)0 P2 P3 P4 P5 19 10 11 13 14 非抢占式SJF P2 P4 P3 0 1 2 4 9 P5 P1 19 非抢占式优先级 P2 P5 0 1 6 P1 P3 P4 16 18 19 RR P1 P2 P3 P4
《操作系统第3次作业》由会员M****1分享,可在线阅读,更多相关《操作系统第3次作业》请在金锄头文库上搜索。
2023律师个人年终工作总结模板(2篇).doc
新人教版小学数学三年级上教学计划
新员工个人年终工作总结(8篇)
县上第一书记述职报告
承包商业绩评价记录表
XX年幼儿园教师职称述职报告
《安全管理资料》之危险化学品生产企业安全检查表
小学语文一年级上生字表(无拼音)
教育专题:1元1次方程单元复习与巩固
乳品课堂教学计划
2021年三年级上第六单元《口算乘法》练习题
怎样教宝宝朗诵诗歌
小学生学习计划集锦15篇.doc
八年级上学期期中考试试题
美编个人简历范文
部编版二年级上册语文园地二语文教案
2022年证券从业资格必考试题库含答案127
2022年大学生记者团工作总结
高分子复合材料技术在滨农科技修复搪瓷反应釜的案例
中小企业的网络营销策略分析以小米为例
2022-12-03 98页
2022-12-01 3页
2022-11-04 2页
2023-03-05 6页
2023-04-21 16页
2022-11-24 40页
2023-08-22 12页
2022-08-20 62页
2023-09-14 70页
2023-02-11 30页