public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@redhat.com>
To: Robin Farine <robin.farine@acn-group.ch>
Cc: eCos users <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] cyg_semaphore_post
Date: Fri, 15 Feb 2002 03:39:00 -0000	[thread overview]
Message-ID: <y07sn836kjr.fsf@balti.cambridge.redhat.com> (raw)
In-Reply-To: <1013767590.2406.6.camel@halftrack>

Robin Farine <robin.farine@acn-group.ch> writes:

> On Mon, 2002-02-11 at 14:58, Nick Garnett wrote:
> 
> [snip]
>  
> > However there is the CYGIMP_KERNEL_SCHED_SORTED_QUEUES option that
> > allows all thread queues to be sorted. This was added primarily to
> > support POSIX, but you can enable it yourself if you want.
> 
> Does the pthreads standard explicitely specify to enqueue threads in
> priority order (sorry, I don't have this paper)? How to avoid starvation
> then?
> 

It certainly requires this for semaphores if
{_POSIX_PRIORITY_SCHEDULING} is defined. It is less clear on what
should happen in mutexes, but if priority inheritance is going to mean
anything then the highest priority waiting thread must get the mutex
when it is unlocked.

As for starvation. I suspect that in real-life systems this is largely
a theoretical problem. If you really have high priority threads
hammering on a mutex at such a rate that waiting low priority threads
cannot get a look-in, you are already overloaded. The only solution is
to rewrite the application to reduce the amount of contention for this
resource.

-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

  reply	other threads:[~2002-02-15 11:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-11  3:56 Stijn Symons
2002-02-11  4:10 ` Andrew Lunn
2002-02-11  4:37   ` Stijn Symons
2002-02-11  5:22     ` Robin Farine
2002-02-11  7:56       ` Chris Gray
2002-02-14 20:45       ` Nick Garnett
2002-02-15  2:07         ` Robin Farine
2002-02-15  3:39           ` Nick Garnett [this message]
2002-02-15  8:18             ` Robin Farine
  -- strict thread matches above, loose matches on Subject: below --
2002-02-11  9:08 Woller, Thomas
2002-02-11  7:10 Woller, Thomas
2002-02-11  7:19 ` Andrew Lunn
2002-02-11  8:39 ` Robin Farine
2002-02-13  5:49 ` Jonathan Larmour
2001-06-13  8:42 harri.siirtola
2001-06-13  4:46 [ECOS] GDB and eCos andre33
2001-06-13  7:44 ` [ECOS] cyg_semaphore_post Joerg Rapka
2001-06-13  8:27   ` Bart Veer

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=y07sn836kjr.fsf@balti.cambridge.redhat.com \
    --to=nickg@redhat.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=robin.farine@acn-group.ch \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).