You will learn how process management is designed, particular how the scheduler is implemented. The scheduler is the heart of the multiprogramming system. It is responsible for choosing a new task to run whenever the CPU is available. In this project, you will replace the standard scheduler with a fair-share scheduler. And you will learn how to observe the behavior of the fair-share scheduler of the standard scheduler.
Fair-share scheduling [Bach 1986] is a more abstract strategy for scheduling than any of the three built-in strategies. The idea is that the CPU should be shared among sets of processes according to the groups that own those processes. For example, suppose that Tom, Dick, and Harry belong to different groups and are logged in to a machine that used fair-share scheduling. Further, suppose that Tom has only one runnable process, Dick has three, and Harry has six. Fair-share scheduling calls for ten runnable processes and instead of each process getting 10% of the CPU cycles, the three groups each get one-third of the CPU cycles to allocate the processes that they own. So Tom's single process will get 33% of the available CPU cycles, each of Dick's processes will get about 11% of the available CPU cycles. and each of Harry's six processes will get about 5.5% of the CPU cycles. If Betty belongs to Dick's group and she logged in to the machine and created two more processes, then Tom's group would have one process but still receive one-third of the CPU cycles. Dick and Betty would have five processes and would be allocated one-third of the CPU cycles, distributed equally among their five processes, with each receiving about 6.7% of the total machine cycles. Each of Harry's six processes would continue to receive about 5.5% of the available CPU cycles.
You are to modify the Linux scheduler and then measure the performance of the system with and without the modified scheduler so that you can compare the effect of the new scheduler.
1. Add a New Scheduling Policy to Support Fair-share Scheduling.
2. Comparing Scheduler Performance
You need to modify "kernel/sched.c" to implement your scheduler, and other components, such as the task descriptor. Design your strategy for implementing the fair-share scheduler so that it has as little impact on the existing code and data structures as possible, even if you have to sacrifice some performance. After you get the new scheduler to work properly, you can reconsider the design from the performance perspective.
Please submit the following items to lab6 dir on elgate: