linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Vargas <wind@cocodriloo.com>
To: Daniel Phillips <phillips@arcor.de>
Cc: Robert Love <rml@tech9.net>, Ian Kumlien <pomac@vapor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [SHED] Questions.
Date: Mon, 1 Sep 2003 16:16:44 +0200	[thread overview]
Message-ID: <20030901141644.GA2359@wind.cocodriloo.com> (raw)
In-Reply-To: <200309011707.20135.phillips@arcor.de>

On Mon, Sep 01, 2003 at 05:07:19PM +0200, Daniel Phillips wrote:
> On Monday 01 September 2003 01:41, Robert Love wrote:
> > Once a task "expires" (exhausts its timeslice), it will not run again
> > until all other tasks, even those of a lower priority, exhaust their
> > timeslice.
> >
> > ...
> >
> > Priority inversion is bad, but the priority inversion in this case is
> > intended.  Higher priority tasks cannot starve lower ones.  It is a
> > classic Unix philosophy that 'all tasks make some forward progress'
> 
> So if I have 1000 low priority tasks and one high priority task, all CPU 
> bound, the high priority task gets 0.1% CPU.  This is not the desirable or 
> expected behaviour.
> 
> My conclusion is, the strategy of expiring the whole active array before any 
> expired tasks are allowed to run again is incorrect.  Instead, each active 
> list should be refreshed from the expired list individually.  This does not 

AFAIK, this could be implemented with a "list swap" operation, taking
the list head for one priority and exchanging them between expired and
active, or perhaps more properly, taking the expired list and adding it
to the end of the active one. This would be O(1) since the task list for
each priority is double-linked and thus has a "last element" pointer on
the list header.

> affect the desirable O(1) scheduling property.  To prevent low priority 
> starvation, the high-to-low scan should be elaborated to skip some runnable, 
> high priority tasks occasionally in a *controlled* way.

Perhaps this could be done with a random but skewed proportion, similar
to the way you select the level to insert into on the "skip list"
datastructure.
 
> IMHO, this minor change will provide a more solid, predictable base for Con 
> and Nick's dynamic priority and dynamic timeslice experiments.
> 
> Regards,
> 
> Daniel
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
winden/network

1. Dado un programa, siempre tiene al menos un fallo.
2. Dadas varias lineas de codigo, siempre se pueden acortar a menos lineas.
3. Por induccion, todos los programas se pueden
   reducir a una linea que no funciona.

  reply	other threads:[~2003-09-01 16:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-31 10:07 [SHED] Questions Ian Kumlien
2003-08-31 10:17 ` Nick Piggin
2003-08-31 10:24   ` Ian Kumlien
2003-08-31 10:41     ` Nick Piggin
2003-08-31 10:46       ` Nick Piggin
     [not found]       ` <1062326980.9959.65.camel@big.pomac.com>
     [not found]         ` <3F51D4A4.4090501@cyberone.com.au>
2003-08-31 11:08           ` Ian Kumlien
2003-08-31 11:31             ` Nick Piggin
2003-08-31 11:43               ` Ian Kumlien
2003-08-31 18:53 ` Robert Love
2003-08-31 19:31   ` Ian Kumlien
2003-08-31 19:51     ` Robert Love
2003-08-31 22:41       ` Ian Kumlien
2003-08-31 23:41         ` Robert Love
2003-09-01  0:00           ` Ian Kumlien
2003-09-01  2:50             ` Con Kolivas
2003-09-01 15:58               ` Antonio Vargas
2003-09-01 22:19               ` Ian Kumlien
2003-09-01  4:03             ` Robert Love
2003-09-01  5:07               ` Con Kolivas
2003-09-01  5:55                 ` Robert Love
2003-09-01 22:24               ` Ian Kumlien
2003-09-01 14:21             ` Antonio Vargas
2003-09-01 19:36               ` Geert Uytterhoeven
2003-09-01 22:49               ` Ian Kumlien
2003-09-01 15:07           ` Daniel Phillips
2003-09-01 14:16             ` Antonio Vargas [this message]
2003-09-01 23:03             ` Ian Kumlien
2003-09-02  0:04               ` Nick Piggin
2003-09-02  0:23               ` Con Kolivas
2003-09-02 10:25                 ` Ian Kumlien
2003-09-02 11:08                   ` Nick Piggin
2003-09-02 17:22                     ` Ian Kumlien
2003-09-02 23:49                       ` Nick Piggin
2003-09-03 23:02                         ` Ian Kumlien
2003-09-04  1:39                           ` Mike Fedyk
2003-09-02 10:44                 ` Wes Janzen

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=20030901141644.GA2359@wind.cocodriloo.com \
    --to=wind@cocodriloo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@arcor.de \
    --cc=pomac@vapor.com \
    --cc=rml@tech9.net \
    /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).