lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAEW6NRRvWrd9U2ix8TuKU8Mqo2BE8GUszVrGN-X6Ui=7Xqq8TA@mail.gmail.com>
Date:   Thu, 26 Oct 2017 13:59:04 -0600
From:   Jonathan Haws <hawsjr@...il.com>
To:     linux-kernel@...r.kernel.org
Subject: POSIX Message Queue Priority Scheduling

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.

Thanks!
Jon

-- 
Jonathan R. Haws
hawsjr@...il.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ