The purpose of scheduling
- Ordering resource assignment
- Do prediction of the system behavior under anticipated loads.
In running time: to permit the new request of the loading-balancing
In compile time: to confirm the feasibility of the system or predict resource needs.
Criteria in Performance
Process /user perspective: Waiting time, Response time(从用户提交请求开始,直达系统首次产生响应为止的时间间隔), Turnaround Time(完成时间 - 提交时间).
System perspective: Throughput, Utilization.
Method in scheduling
-
First come first served
-
Round Robin
A round-robin scheduler generally employs time-sharing, giving each job a time slot or quantum[4](its allowance of CPU time), and interrupting the job if it is not completed by then. -
Feedback with 2^i pre-empty intervals
---- When processes can be readily categorized, then multiple separate queues can be established, lower priority more 2^i unit time.
---- Scheduling must also be done between queues, that is scheduling one queue to get time relative to other queues.
---- Jobs may be moved from one queue to another for a variety of reasons
---- Scheduling is the most flexible, because it can be tuned for any situation -
Shortest job first
when the computing time is know and switch is expensive then this method is good. -
Highest Response Ration First(HRRF)
Combine the "Short job first" and "First come first serve". -
Shortest remaining time first
The difference between 6 and 4 is that this one has ability to pre-emption the current executing job.
Predictable scheduling
guarantee task:
- the deadline
- reaction time
- data flow level
- delivery time
- the bound of variables in result.
网友评论