linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ludovic <ludovic.fernandez@sun.com>
To: Oswald Buddenhagen <ob6@inf.tu-dresden.de>
Cc: Rik van Riel <riel@conectiva.com.br>, linux-kernel@vger.kernel.org
Subject: Re: static scheduling - SCHED_IDLE?
Date: Wed, 07 Mar 2001 16:34:50 -0500	[thread overview]
Message-ID: <3AA6A97A.1EDE6A0B@sun.com> (raw)
In-Reply-To: <20010307184000.A26594@ugly.wh8.tu-dresden.de> <Pine.LNX.4.33.0103071447340.1409-100000@duckman.distro.conectiva> <20010307202027.B27421@ugly.wh8.tu-dresden.de>

Oswald Buddenhagen wrote:
> 
> > The problem with these things it that sometimes such a task may hold
> > a lock, which can prevent higher-priority tasks from running.
> >
> true ... three ideas:
> - a sort of temporary priority elevation (the opposite of SCHED_YIELD)
>   as long as the process holds some lock
> - automatically schedule the task, if some higher-priorized task wants
>   the lock
> - preventing the processes from aquiring locks at all (obviously this
>   is not possible for required locks inside the kernel, but i don't
>   know enough about this)
> 
> > A solution would be to make sure that these tasks get at least one
> > time slice every 3 seconds or so, so they can release any locks
> > they might be holding and the system as a whole won't livelock.
> >
> did "these" apply only to the tasks, that actually hold a lock?
> if not, then i don't like this idea, as it gives the processes
> time for the only reason, that it _might_ hold a lock. this basically
> undermines the idea of static classes. in this case, we could actually
> just make the "nice" scale incredibly large and possibly nonlinear,
> as mark suggested.
> 

Since the linux kernel is not preemptive, the problem is a little
bit more complicated; A low priority kernel thread won't lose the 
CPU while holding a lock except if it wants to. That simplifies the
locking problem you mention but the idea of background low priority 
threads that run when the machine is really idle is also not this
simple.

Ludo.

  reply	other threads:[~2001-03-08  0:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-07 17:40 static scheduling - SCHED_IDLE? Oswald Buddenhagen
2001-03-07 18:04 ` Rik van Riel
2001-03-07 19:20   ` Oswald Buddenhagen
2001-03-07 21:34     ` ludovic [this message]
2001-03-08 11:17       ` Zdenek Kabelac
2001-03-08 11:41         ` Andrew Morton
2001-03-08 13:29     ` Boris Dragovic
2001-03-08 13:44       ` Rik van Riel
2001-03-08 20:19         ` Boris Dragovic
2001-03-08 20:47           ` Rik van Riel
2001-03-09 19:38             ` george anzinger
2001-03-09 20:19               ` Adrian Cox
2001-03-12 18:05                 ` Jamie Lokier
2001-03-12 19:37                   ` Adrian Cox
2001-03-13  9:40                     ` Jamie Lokier
2001-03-10  2:58               ` Rik van Riel
2001-03-09 19:42             ` Jamie Lokier
2001-03-10  3:02               ` Rik van Riel
2001-03-09 20:09                 ` Jamie Lokier
2001-03-10  4:56                   ` Rik van Riel
2001-03-14 13:19                     ` Jamie Lokier
2001-03-15  3:13                       ` Rik van Riel
2001-03-14 14:26                   ` Philipp Rumpf
2001-03-09 11:26       ` Pavel Machek

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=3AA6A97A.1EDE6A0B@sun.com \
    --to=ludovic.fernandez@sun.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ob6@inf.tu-dresden.de \
    --cc=riel@conectiva.com.br \
    /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).