调度算法选择题目01

  1. A computer system is mainly used for non-interactive work where jobs (processes) arrive randomly, persist until completed and then leave the system. There may be many processes that need scheduling concurrently. Describe two process scheduling algorithms that would be suitable for this system and explain why they are appropriate.
  2. A different system deals mainly with multiple, concurrent, interactive processes. Give two process scheduling algorithms for this situation and explain why they are appropriate.
  3. A new system is to be developed that will run a mix of the two types of processes. Are any of the previous scheduling algorithms appropriate? Describe one new algorithm that could be used.
    [10 marks]
  1. For non-interactive works, there is no need for quick response time and also the turn around time for process is important(jobs persist until completed). Meanwhile, the processes arrive randomly. Thus, FCFS and SJF are suitable for this system.
  2. For interactive works, the response time for a process matters. And round robin improve response time compared two scheduling algorithm in question 1. Thus, considering the interative works, round robin and priority queue are two suitable for this system.
  3. This system may require less turn around time and less response time for both types of processes. Using SJF could get optimal turn around time. However, SJF is a non-preemptive algorithm, which is harmful for interactive processes. We can design a good algorithm that select shortest job to run and using round robin time slice for each process.

The following example will show how this works:

ProcessBurst timetype
P124Interactive
P23non-interactive
P33non-interactive

P2 and P3 have the same burst time that is shortest time. Assume P2 starts firstly, and then after time slice = 1, P3 exectues. Then P3. P1.
Thus, P2->P3->P1->P2->P3->P1->P2->P3->P1.
This help improve the response time for P1(interactive), and also reduce the turn around time for P2 and P3 if they are non-interactive

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值