All of lore.kernel.org
 help / color / mirror / Atom feed
From: michi1@michaelblizek.twilightparadox.com (michi1 at michaelblizek.twilightparadox.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: When is to preempt safe?
Date: Sun, 9 Oct 2011 15:52:43 +0200	[thread overview]
Message-ID: <20111009135242.GC10358@grml> (raw)
In-Reply-To: <CAOXENUjRTJnRbXAOBr=RotnUu-Z=QJ_8r_Ymgvhpr5BcpMczEQ@mail.gmail.com>

Hi!

On 19:52 Sun 09 Oct     , Parmenides wrote:
> 2011/10/9 Daniel Baluta <daniel.baluta@gmail.com>:
> > On Sat, Oct 8, 2011 at 7:19 PM, Parmenides <mobile.parmenides@gmail.com> wrote:
> >
> > Well, I think that if task B has higher priority than task A, then A would
> > never have the chance to release the lock.
> >
> 
> Hmm...!  Does that mean lower priority tasks never have chances to run
> when a highest priority task is running? AFAIK, for the old O(1)
> scheduler, even with higher priority, B eventually will be put into
> expire array when it using up its timeslice. That cause A has chance
> to run again. As far as the newer CFS scheduler is concerned,  when
> B's virtual clock is go ahead prior to A, the the scheduler might also
> select A to run again. So, I think A can release the spin lock
> eventually.

This is true for "normal" priorities. For real time tasks this is different:
The kernel always runs the task with the highest priority. However, a few
years ago, a throttle mechanism was implemented because real time tasks
occasionally locked up the system.

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com

  reply	other threads:[~2011-10-09 13:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 11:27 When is to preempt safe? Parmenides
2011-10-07 16:32 ` Chetan Nanda
2011-10-08 16:19   ` Parmenides
2011-10-08 17:09     ` Daniel Baluta
2011-10-08 17:32       ` Dave Hylands
2011-10-09 11:52       ` Parmenides
2011-10-09 13:52         ` michi1 at michaelblizek.twilightparadox.com [this message]
2011-10-09  6:42     ` Michael Blizek
2011-10-07 16:44 ` Jonathan Neuschäfer
2011-10-07 19:39 ` Michael Blizek
2011-10-08 16:24   ` Parmenides
2011-10-09  6:29     ` Michael Blizek
2011-10-09  6:53       ` Dave Hylands
2011-10-09 13:44         ` michi1 at michaelblizek.twilightparadox.com

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=20111009135242.GC10358@grml \
    --to=michi1@michaelblizek.twilightparadox.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.