【正文】
aging can be implemented this way. ? Multilevelfeedbackqueue scheduler defined by the following parameters: ?number of queues. ?scheduling algorithms for each queue. ?method used to determine which queue a process will enter when that process needs service. ?method used to determine when to upgrade/downgrade a process. Scheduling algorithms: Multilevel feedback queue ? Three queues: ? Q0 – time quantum 8 milliseconds ? Q1 – time quantum 16 milliseconds ? Q2 – FCFS ? Scheduling ? A new job enters queue Q0 which is served FCFS. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q1. ? At Q1, job is again served FCFS and receives 16 additional milliseconds. If it still does not plete, it is preempted and moved to queue Q2. Scheduling algorithms: Multilevel feedback queue MULTIPLEPROCESSOR SCHEDULING ? When multiple CPUs are available, the scheduling problem is more plex. ? For multiple CPUs ? Homogeneous vs heterogeneous CPUs ? Uniform memory access(UMA) vs NonUniform memory access(NUMA). ? Scheduling ? Master/Slave vs peer/peer ? Separate queues vs mon queue (sharing) ? Asymmetric multiprocessing – only one processor accesses the system data structures, alleviating the need for data sharing. ? Symmetric multiprocessing. REALTIME SCHEDULING ? Hard realtime systems – required to plete a critical task within a guaranteed amount of time. ? Hard realtime systems are posed of specialpurpose software running on hardware dedicated to their critical process, and lack the full functionality of modern puters and operating systems. ? Soft realtime puting – requires that critical 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 sche