【正文】
processes receive priority over less fortunate ones. ? Priority scheduling ? Low dispatch latency ? To insert preemption points. ? To support priority inversion. (See the next slide) ? To make the entire kernel preemptible. Realtime scheduling: Dispatch latency ALGORITHM EVALUATION ? Deterministic modeling ? Queueing models ? Simulations ? Implementation Algorithm Evaluation: Deterministic modeling ? Deterministic modeling (確定模型法) takes a particular predetermined workload and defines the performance of each algorithm for that workload. ? To describe scheduling algorithms and provide examples, ? Simple and fast, ? But, Too specific to be useful. Algorithm Evaluation: Queuing models ? Queuing models (排隊(duì)模型) ? Queueingwork analysis ? The puter system is described as a work of servers. Each server has a queue of waiting process. The CPU is a server with its ready queue, as is the I/O system with its device queues. ? Knowing arrival rates and service rates, we can pute utilization, average queue length, average wait time, and so on. ? Useful for paring scheduling algorithms. ? Real distributions are difficult to work with. ? Some assumptions required. Algorithm Evaluation: Simulation ? Simulations (模擬 ) involve programming a model of the puter system. ? Software data structures represent the major ponents of the system. ? The simulator has a variable representing a clock。 as this variable ‘s value is increased, the simulator modifies the system to reflect the activities of the device, the processes, and the scheduler. ? As the simulation executes, statistics that indicate algorithm performance are gathered and printed. ? Artificial data or trace tapes. ? Useful but expensive. Algorithm Evaluation: Implementation ? Implementation (實(shí)現(xiàn) ) ? To code the algorithm, ? To put it in the OS, and ? To see how it works. ? Costly. ? ? A Perfect Scheduling Algorithm Is Not Easy To Found. ? ? In Practice, We Don’t Really Need The Perfect Scheduling Algorithm. SOLARIS 2 SCHEDULING WINDOWS 2022 PRIORITIES LINUX SCHEDULING ? realtime processes (1000+), nonrealtime processes(1000) ? Credits = Credits/2 + priority ?High priority ? interactive processes Homework ? *** ? *** ? ?