From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Creating scheduler
Date: Wed, 06 Feb 2013 13:16:22 -0500 [thread overview]
Message-ID: <10831.1360174582@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Wed, 06 Feb 2013 23:19:26 +0530." <511297a5.2251420a.0e81.ffff8afe@mx.google.com>
On Wed, 06 Feb 2013 23:19:26 +0530, jeshkumar555 at gmail.com said:
> Can anyone suggest a good tutorial to create our own scheduler ?
Doing an I/O scheduler is pretty trivial, and there's a number of
examples in-tree already to look at.
If you mean a CPU scheduler, the major reason why there's no tutorial
is because writing a non-toy scheduler is *hard*, and by and large
anybody who's a good enough kernel hacker to write a working scheduler
doesn't need a tutorial.
Why is it hard? Lots of reasons. Even on a single-core, single-thread
CPU, it's hard to go a good job of picking the next task to run, mostly
because tasks are so damned good at changing behavior. You decide that
it would be good to run an I/O bound task, so you pick a task that went
into an I/O wait its last 12 times on the CPU - at which point the task
turns around and goes CPU bound crunching all the data it read in the
last 12 times. :)
You also have interactions with thermal issues and frequency governors
(usually, cranking to highest frequency and doing race-to-idle and then
dropping to lowest freq results in the lowest total energy use, but especially
for high-density applications, there may be a upper limit on watts per second
that you can cool, resulting in trade-offs being needed). Then there's cache
affinity issues, balancing load across cores on multi-socket systems, etc etc
etc...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130206/4ebaedf3/attachment.bin
next prev parent reply other threads:[~2013-02-06 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 17:49 Creating scheduler jeshkumar555
2013-02-06 18:16 ` Valdis.Kletnieks at vt.edu [this message]
2013-02-06 19:40 ` Jonathan Neuschäfer
2013-02-06 20:35 ` Valdis.Kletnieks at vt.edu
2013-02-07 4:08 ` Peter Teoh
-- strict thread matches above, loose matches on Subject: below --
2013-02-07 4:45 jeshkumar555
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10831.1360174582@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).