From: Nick Piggin <piggin@cyberone.com.au>
To: Mike Fedyk <mfedyk@matchmail.com>
Cc: Eric St-Laurent <ericstl34@sympatico.ca>, linux-kernel@vger.kernel.org
Subject: Re: scheduler interactivity: timeslice calculation seem wrong
Date: Wed, 20 Aug 2003 12:41:47 +1000 [thread overview]
Message-ID: <3F42DFEB.9010404@cyberone.com.au> (raw)
In-Reply-To: <20030819175105.GA19465@matchmail.com>
Mike Fedyk wrote:
>On Tue, Aug 19, 2003 at 01:06:49PM +1000, Nick Piggin wrote:
>
>>Its done this way because this is really how the priorities are
>>enforced. With some complicated exceptions, every task will be
>>allowed to complete 1 timeslice before any task completes 2
>>(assuming they don't block).
>>
>>So higher priority tasks need bigger timeslices.
>>
>>
>>>also, i think dynamic priority should be used for timeslice calculation
>>>instead of static priority. the reason is, if a low priority task get a
>>>priority boost (to prevent starvation, for example) it should use the
>>>small timeslice corresponding to it's new priority level, instead of
>>>using it's original large timeslice that can ruin the interactive feel.
>>>
>>>
>>Among other things, yes, I think this is a good idea too. I'll be
>>addressing both these issues in my scheduler fork.
>>
>>I do have dynamic timeslices, but currently high priority tasks
>>still get big timeslices.
>>
>
>TS = Time Slice
>
>What needs to be changed is the 1TS per pass through the active array
>concept.
>
>Devide the time slice into smaller Time Units, so that you can add one unit
>per priority level.
>
>TU = Time Units
>
>Then you account these TUs instead of slices.
>
>so, if nice -19 has 1 TU, and nice -19 has 40 TUs (maybe ranging from 1ms -
>200ms with a TU of 5ms).
>
>So nice -19 can have a long time slice and run until it expires if it
>doesn't get preempted.
>
>The more I think this through, the harder it gets to take this concept to
>completion, but the basic idea is to have multiple TSes per slice, and to
>account on TSes as well as slices. That way, you have longer slices for
>nicer tasks, but I'm not sure how it would fit into the two array scheduler
>we have now. You'd have to have another list for the processes that are
>have used up their slice, but haven't waited long enough for them to get
>another slice (because you want to give more total CPU percentage to the
>higher priorities, while still giving them smaller slices).
>
>Anyway, if anyone can take this idea and make it into a working scheduler,
>I'd be most interested in the results...
>
My idea is just to modify timeslices. It should achieve a similar
effect to what you describe I think.
next prev parent reply other threads:[~2003-08-20 2:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-19 2:54 scheduler interactivity: timeslice calculation seem wrong Eric St-Laurent
2003-08-19 3:06 ` Nick Piggin
2003-08-19 4:07 ` Eric St-Laurent
2003-08-19 5:23 ` Nick Piggin
2003-08-19 6:54 ` Eric St-Laurent
2003-08-19 19:18 ` bill davidsen
2003-08-19 23:48 ` Eric St-Laurent
2003-08-19 23:54 ` Eric St-Laurent
2003-08-19 19:01 ` bill davidsen
2003-08-20 0:15 ` Eric St-Laurent
2003-08-20 0:32 ` David Lang
2003-08-20 0:48 ` William Lee Irwin III
2003-08-20 4:11 ` Bill Davidsen
2003-08-20 4:36 ` William Lee Irwin III
2003-08-20 13:59 ` Andrew Theurer
2003-08-20 16:18 ` Bill Davidsen
2003-08-20 2:52 ` Nick Piggin
2003-08-19 19:02 ` Mike Fedyk
2003-08-19 17:51 ` Mike Fedyk
2003-08-20 2:41 ` Nick Piggin [this message]
2003-08-20 18:45 ` Mike Fedyk
2003-08-19 4:13 ` Con Kolivas
2003-08-19 4:23 ` Eric St-Laurent
2003-08-19 4:29 ` Con Kolivas
2003-08-19 5:06 ` Eric St-Laurent
2003-08-19 6:18 ` William Lee Irwin III
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=3F42DFEB.9010404@cyberone.com.au \
--to=piggin@cyberone.com.au \
--cc=ericstl34@sympatico.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=mfedyk@matchmail.com \
/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