Re: POSIX Message Queue Priority Scheduling

Jonathan Haws <[email protected]>
Newsgroups org.kernel.vger.linux-embedded
Message-ID <[email protected]>
> > Can someone explain to me how message queues handle waking multiple
> > threads blocked on a single message queue?
> > 
> > My situation is I have multiple writers blocking on a full message
> > queue, each posting messages with priority equal to the thread
> > priority.  I want to make sure they wake and post in priority
> > order,
> > however my application is behaving as if they are waking in FIFO
> > order
> > (i.e. the order in which they blocked).  Each blocking thread is
> > scheduled with the SCHED_FIFO policy with a different priority with
> > system level scope.
> > 
> > I've searched the Internet high and low for something describing
> > how
> > this should work and all I can find is POSIX man pages describing
> > that
> > multiple blockers wake in priority order **if Priority Scheduling
> > is
> > supported**.  Since the kernel scheduler is a priority scheduler I
> > would think that the threads would wake in priority order and post
> > to
> > the queue, however that doesn't appear to be the case.  I'm sure
> > I'm
> > just missing some subtle detail and was hoping the experts here on
> > this list can help shine some light on what I'm seeing, since its
> > at
> > the kernel level that these threads are made ready to run.
> > 
> > I have a small test application that I can post here if
> > necessary.  If
> > this isn't the right place to ask this, by all means let me know
> > and
> > direct me to the right forum.

Bump...anyone have any thoughts on this?  I haven't been able to find
anything on this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.