Re: Help on Making a good Scheduler
Posted: Thu Feb 18, 2016 3:32 pm
Hi,
You might find that (especially for a general purpose OS) you have some very different characteristics involved. Most general purpose OSs have multiple different scheduling policies (with completely different scheduling algorithms for different scheduling policies) for this reason. For example, you might have something designed specifically for real-time tasks, something designed for specifically for high priority interactive tasks, something designed specifically for batch processing, something designed specifically for idle threads, etc.
With multiple scheduling policies you end up with a kind of 'meta scheduler" - something to determine which scheduling policy (plus different schedulers for each scheduling policy).
"A good algorithm" can be "many good algorithms".
Cheers,
Brendan
Different tasks have different characteristics, so start by writing a list of "important characteristics". Note that this will depend on the nature of your OS and what it's designed for. For "micro-kernel with synchronous message passing" you might be expecting a lot of tasks that wait for a message, do very little, then send a reply. For "micro-kernel with asynchronous message passing" you might postpone task switches so that tasks handle many messages and send many replies. For "real time OS" you might have very different requirements. For "monolithic OS designed for HPC" you might want something very different to "monolithic OS designed for web servers".ashishkumar4 wrote:ok I finally got all this. But now I am in trouble :/ now how to make a good scheduler? I don't have any more ideas :/ means neither round robins nor lottery scheduling seems to fulfill the requirements. Please help me make a good algorithm. Thanks
You might find that (especially for a general purpose OS) you have some very different characteristics involved. Most general purpose OSs have multiple different scheduling policies (with completely different scheduling algorithms for different scheduling policies) for this reason. For example, you might have something designed specifically for real-time tasks, something designed for specifically for high priority interactive tasks, something designed specifically for batch processing, something designed specifically for idle threads, etc.
With multiple scheduling policies you end up with a kind of 'meta scheduler" - something to determine which scheduling policy (plus different schedulers for each scheduling policy).
"A good algorithm" can be "many good algorithms".
Cheers,
Brendan