public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Giuseppe Lipari <giuseppe.lipari@sssup.it>
To: Raistlin <raistlin@linux.it>
Cc: Chris Friesen <cfriesen@nortel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Douglas Niehaus <niehaus@ittc.ku.edu>,
	Henrik Austad <henrik@austad.us>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Bill Huey <billh@gnuppy.monkey.org>,
	Linux RT <linux-rt-users@vger.kernel.org>,
	Fabio Checconi <fabio@gandalf.sssup.it>,
	"James H. Anderson" <anderson@cs.unc.edu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ted Baker <baker@cs.fsu.edu>,
	Dhaval Giani <dhaval.giani@gmail.com>,
	Noah Watkins <jayhawk@soe.ucsc.edu>,
	KUSP Google Group <kusp@googlegroups.com>,
	Tommaso Cucinotta <cucinotta@sssup.it>,
	Giuseppe Lipari <lipari@retis.sssup.it>
Subject: Re: RFC for a new Scheduling policy/class in the Linux-kernel
Date: Fri, 17 Jul 2009 15:35:10 +0200	[thread overview]
Message-ID: <4A607E0E.5080302@sssup.it> (raw)
In-Reply-To: <1247568455.9086.115.camel@Palantir>

[-- Attachment #1: Type: text/plain, Size: 3973 bytes --]

Dear all,

a few consideration on the BWI scheme, that was mentioned by 
Peter and by Raistlin a few messages ago. I do not know very 
well the PEP scheme, from the discussion until now the basic 
idea looks pretty similar to our protocol. The BWI is described 
in this paper:

[1] http://feanor.sssup.it/~lipari/papers/rtss2001-bwi.ps.gz

(I just removed the password, feel free to download it, I hope IEEE
lawyers will not chase me!).

In essence, when a task is blocked on a lock, its budget may be
consumed by the task holding the lock. A task can be assigned one or
more pairs (budget,deadline), one is its original one, the others are
"inherited" when holding a lock on which other tasks are blocked.

This scheme has advantages and disadvantages.  The advantages are:

1) Isolation. It is easy to see that the budget of a task can be
stolen only by tasks that share common locks, directly or
indirectly. For the sake simplicity, consider only non nested
locks. If two tasks A and B do not share any lock, then they cannot
influence each other. (In the paper, this property is generalized to
nested locks).  This property is useful if we want to isolate the
behavior of one (group of) task(s) from the others. For example, a
"hard real-time" task (group) must be isolated from soft real-time
tasks.  Under EDF other classical protocols (like PI, SRP) do not have
the same property, because letting a task use a critical section for
longer than expected can jeopardize the schedulability of the any
other tasks.


2) Simpler admission test. With other schemes (PI, SRP), it is
necessary to compute blocking times for all tasks, which depend on the
length of the critical sections.  The blocking times are then used in
the admission test formula. However, if one blocking time is wrongly
calculated, at run-time any task can miss its deadline. With BWI,
instead, the admission test is the simpler \sum U_i \leq 1, and
doesnot depend on the length of the critical section.

3) Under the assumption that tasks do not block inside a critical
section, BWI can be implemented in a fairly simple way.

4) It is indeed possible (under certain conditions) to verify the
schedulability of a hard real-time task H by knowing the length of all
critical sections of all tasks that share some lock with H. The very
complex procedure is explained in the paper.

However, BWI has some disadvantages

1) It is only for single processors.

2) From a schedulability point of view, if we want to guarantee that
every task always respects its deadline, when computing its budget we
must calculate the "interference" of other tasks. Since, we have to do
this for every "hard" task, we may end up counting the same critical
section several times, thus wasting some bandwidth.  This is better
explained in the paper (section 6.4.1).

3) If a task is allowed to block in the middle of a critical section
(for example, due to a page fault), the implementation becomes much
more complex.

Concerning point 1, as Raistlin pointed out (see its e-mails), he is
working on extending BWI to multiprocessors, also from a theoretical
point of view. It is possible that the result will be similar to the
one obtained by the Dougleas Niehaus with PEP. We hope he will be able
to add some "theoretical spice"!

Concerning point 2, this cannot be avoided. We believe that BWI is
useful for open systems (where tasks are created/killed dynamically)
and for soft real-time systems. However, under certain conditions, it
allows to schedule and analyse hard real-time tasks, even when mixed
with soft real-time tasks.

Concerning point 3, this is the most difficult point. In fact,
achieving an efficient implementation in this case seems very
unlikely. However, we believe that blocking inside a critical section
it is probably a rare event, and then maybe it is possible to afford
some extra overhead in such unfortunate cases.

I hope I clarified some obscure issues with BWI! 

Regards,

Giuseppe Lipari



[-- Attachment #2: giuseppe_lipari.vcf --]
[-- Type: text/x-vcard, Size: 181 bytes --]

begin:vcard
fn:Giuseppe Lipari
n:Lipari;Giuseppe
email;internet:giuseppe.lipari@sssup.it
tel;work:+39 050882030
tel;fax:+39 050882003
tel;cell:+39 3480718908
version:2.1
end:vcard


  parent reply	other threads:[~2009-07-17 13:35 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 21:50 RFC for a new Scheduling policy/class in the Linux-kernel Henrik Austad
2009-07-11 18:28 ` Peter Zijlstra
2009-07-12  2:40   ` Douglas Niehaus
2009-07-12 15:31     ` Peter Zijlstra
2009-07-13 15:44       ` Raistlin
2009-07-13 16:33         ` Chris Friesen
2009-07-14 10:47           ` Raistlin
2009-07-14 11:03             ` Peter Zijlstra
2009-07-14 18:19               ` Raistlin
2009-07-14 14:48             ` Chris Friesen
2009-07-14 15:19               ` James H. Anderson
2009-07-14 16:31                 ` Peter Zijlstra
2009-07-14 16:54                   ` James H. Anderson
2009-07-14 19:28                     ` Henrik Austad
2009-07-14 19:33                       ` James H. Anderson
2009-07-15 21:53                       ` Ted Baker
2009-07-17  7:40                         ` Henrik Austad
2009-07-17 13:37                           ` Ted Baker
2009-07-15  4:25                     ` Bjoern B. Brandenburg
2009-07-15 20:55                     ` Ted Baker
2009-07-15 21:53                       ` Chris Friesen
2009-07-15 22:34                         ` Ted Baker
2009-07-15 22:39                           ` Dhaval Giani
2009-07-15 23:16                             ` Ted Baker
2009-07-16  8:58                               ` Peter Zijlstra
2009-07-16  9:11                                 ` Peter Zijlstra
2009-07-17  0:32                                 ` Raistlin
2009-07-17  0:43                                 ` Raistlin
2009-07-16 12:17                               ` Raistlin
2009-07-16 23:29                       ` Raistlin
2009-07-18 20:12                         ` Michal Sojka
2009-07-14 17:16                   ` James H. Anderson
2009-07-15 21:19                     ` Ted Baker
2009-07-14 19:54                   ` Raistlin
2009-07-14 16:48               ` Raistlin
2009-07-14 18:24                 ` Chris Friesen
2009-07-14 19:14                   ` Raistlin
2009-07-15 22:14                   ` Ted Baker
2009-07-16  7:17                     ` Henrik Austad
2009-07-16 23:13                       ` Ted Baker
2009-07-17  0:19                         ` Raistlin
2009-07-17  7:31                         ` Henrik Austad
2009-07-16 14:46                     ` Chris Friesen
2009-07-16 22:34                       ` Ted Baker
2009-07-16 23:07                         ` Raistlin
2009-07-15 21:45               ` Ted Baker
2009-07-15 22:12                 ` Chris Friesen
2009-07-15 22:52                   ` Ted Baker
2009-07-17 13:35             ` Giuseppe Lipari [this message]
2009-07-13 17:25         ` Peter Zijlstra
2009-07-13 18:14           ` Noah Watkins
2009-07-13 20:13             ` Ted Baker
2009-07-13 21:45               ` Chris Friesen
2009-07-14 11:16                 ` Raistlin
2009-07-15 23:11                 ` Ted Baker
2009-07-16  7:58                   ` Peter Zijlstra
2009-07-16  8:52                     ` Thomas Gleixner
2009-07-16 12:17                     ` Raistlin
2009-07-16 12:59                       ` James H. Anderson
2009-07-16 13:37                         ` Peter Zijlstra
2009-07-16 22:15                     ` Ted Baker
2009-07-16 22:34                       ` Karthik Singaram Lakshmanan
2009-07-16 23:38                         ` Ted Baker
2009-07-17  1:44                           ` Karthik Singaram Lakshmanan
2009-07-16 15:17                   ` Chris Friesen
2009-07-16 21:26                     ` Ted Baker
2009-07-16 22:08                       ` Chris Friesen
2009-07-16 23:54                         ` Ted Baker
2009-07-14  9:15             ` Peter Zijlstra
2009-07-14 19:07               ` Raistlin
2009-07-13 17:28         ` Peter Zijlstra
2009-07-14 19:47           ` Raistlin
     [not found]     ` <002301ca0403$47f9d9d0$d7ed8d70$@tlh@comcast.net>
2009-07-13 23:47       ` Douglas Niehaus
2009-07-14  7:27         ` Chris Friesen
2009-07-14  7:44           ` Douglas Niehaus
2009-07-12  6:17   ` Henrik Austad
2009-07-13  9:55   ` Raistlin
2009-07-13 10:14     ` Peter Zijlstra
2009-07-13 16:06       ` Raistlin
2009-07-14  8:42         ` Peter Zijlstra
2009-07-14  9:36           ` Raistlin
  -- strict thread matches above, loose matches on Subject: below --
2009-07-16 17:54 Raj Rajkumar

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=4A607E0E.5080302@sssup.it \
    --to=giuseppe.lipari@sssup.it \
    --cc=a.p.zijlstra@chello.nl \
    --cc=anderson@cs.unc.edu \
    --cc=baker@cs.fsu.edu \
    --cc=billh@gnuppy.monkey.org \
    --cc=cfriesen@nortel.com \
    --cc=cucinotta@sssup.it \
    --cc=dhaval.giani@gmail.com \
    --cc=fabio@gandalf.sssup.it \
    --cc=henrik@austad.us \
    --cc=jayhawk@soe.ucsc.edu \
    --cc=kusp@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=lipari@retis.sssup.it \
    --cc=mingo@elte.hu \
    --cc=niehaus@ittc.ku.edu \
    --cc=raistlin@linux.it \
    --cc=tglx@linutronix.de \
    /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