All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Rodrigo Rosenfeld Rosas <lbocseg@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Have condition variables Priority Inheritance Protection (PIP)?
Date: Thu, 04 May 2006 08:54:09 +0200	[thread overview]
Message-ID: <4459A511.8050302@domain.hid> (raw)
In-Reply-To: <200605031315.01583.lbocseg@domain.hid>

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

Rodrigo Rosenfeld Rosas wrote:
> Em Quarta 03 Maio 2006 04:57, Jan Kiszka escreveu:
> 
>>> ...Or should I use other IPC mechanism for sharing resource with
>>> PIP?
>> Mutexes were invented for such resource access control :). They have a
>> strict ownership concept, thus allowing to apply PIP as well.
> 
> Yes, however I can't figure out how could I use mutexes as counting 
> semaphores, for instance. They have different meanings. However I could think 
> in semaphores protected by PIP in singular cases, although I couldn't figure 
> out how to do it in a systematic approach so that it could be used in a 
> realtime framework such as Xenomai...
> 

So you have to protect a multi-instance resource which can be used by a
certain number of tasks in parallel? Is this a real scenario or just a
hypothetical?

Let's consider it's real: this means that every task successfully
requesting the resource becomes one of the owners. So you would have to
maintain a list of owners, not just a single reference as with mutexes.
Once someone requests the resource when there are no instances left, at
least one of the owners should be boosted to the requesters priority.

All feasible, but probably so special with traps and pitfalls (think of
initialising or handling multiple requests by the same tasks) that no
one yet developed a generic mechanism for any OS I know of. But you are
always free to do so based on existing elementary mechanisms. :)

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

  reply	other threads:[~2006-05-04  6:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-28 20:36 [Xenomai-help] Have condition variables Priority Inheritance Protection (PIP)? Rodrigo Rosenfeld Rosas
2006-04-28 20:42 ` Jan Kiszka
2006-05-02 12:36   ` Rodrigo Rosenfeld Rosas
2006-05-03  7:57     ` Jan Kiszka
2006-05-03 16:15       ` Rodrigo Rosenfeld Rosas
2006-05-04  6:54         ` Jan Kiszka [this message]
2006-05-04 13:58           ` Rodrigo Rosenfeld Rosas

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=4459A511.8050302@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=lbocseg@domain.hid \
    --cc=xenomai@xenomai.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.