【正文】
PU utilization. Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition Rate – Monotonic Scheduling Example Missed Deadlines with Rate Monotonic Scheduling Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition Earliest Deadline First Scheduling (EDF) ? Priorities are assigned according to deadlines: the earlier the deadline, the higher the priority。 the later the deadline, the lower the priority ? Theoretically optimal as theoretically CPU utilization is 100%, but in practice it is impossible to achieved due to cost of context switching and interrupt handling. Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition Algorithm Evaluation (Optional) ? How to select CPUscheduling algorithm for an OS? ? Determine criteria, then evaluate algorithms. ? Four evaluation methods are discussed: ? Deterministic modeling: Type of Analytic evaluation. ? Given a predetermined load, putes performance of each algorithm for it. For example, given the processes and their CPU bursts, one can pute the average waiting times and evaluate which algorithm gives least waiting times. ? This type of modelling is simple and fast ? Most cases, processes running on a system vary, hence this type of modelling is not useful. Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition Algorithm Evaluation Cont. ? Queuing Models: Describes the arrival of processes, and CPU and I/O bursts probabilistically ? Computer system described as work of servers, each with queue of waiting processes ? Knowing arrival rates and service rates ? Computes utilization, average queue length, average wait time, etc. Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition Little’s Formula ? n = average queue length ? W = average waiting time in queue ? λ = average arrival rate into queue ? Little’s law – in steady state, processes leaving queue must equal processes arriving, thus: n = λ x W ? Valid for any scheduling algorithm and arrival distribution ? For example, if on average 7 processes arrive per second, and normally 14 processes in queue, then average wait time per process = 2 seconds Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition Simulation and Implementation ? Simulations: ? Provide more accurate evaluation of scheduling algorithm ? Running Simulations involves programming a model of the system and maintaining a clock. ? Simulator modifies system state and logs the activities of the devices, processes and scheduler. ? Implementation: ? Most accurate way of evaluating a scheduling algorithm is to implement it and put it in the Operating system and test it in real time! Silberschatz, Galvin and Gagne 169。2022 Operating System Concepts – 9th Edition End of Chapter