Am 02.03.2014 um 15:21 schrieb John Kasunich <[email protected]>:

> I find it hard to believe that these new RTOS options don't
> offer a task priority mechanism.

You dont have to believe it, because it's not true.

Let me recap all the facts before we go further:

1. All the RT flavors, and Posix, support threads with priorities, as do the 
underlying kernels.
2. All the RT flavors, and Posix, support monotonic scheduling. They do so by 
different means, and require different ways to elevate the privilege level: run 
in kernel, require a specific group permission, or require a command like 
'setcap cap_sys_nice=pe <binary>' (basically a finer-grained setuid)
3. The 'elevated privilege level' for this scheduling policy _does_ make sense; 
it would be too easy to starve other processes accidentially otherwise.
4. The old 'sim' rtapi achieved monotonic scheduling by using the Gnu phtreads 
library. This library has fallen into disuse and has not seen a patch in 8 
years. It's not even listed on oloh any more, if it ever was.
5. The RT-PREEMPT RTAPI code which I imported from Michael Büsch uses normal 
Posix threads. It uses the sched_setscheduler(..SCHED_FIFO..) call to set the 
desired scheduling policiy. See man 2 sched_setscheduler. This system call 
requires elevated privileges. Except for this system call, the same code 
qualifies for 'sim' (= nonRT Posix).
6. To get rid of the legacy library, and simplify maintenance, I decided to 
reuse the code between rt-preempt and posix flavors, and suppress the 
sched_setscheduler() call for posix (sim), which is the source of the observed 
behavior.
7. Depending on whom you ask, you get different definitions of what 'sim' 
actually means. Some say it means 'cannot drive hardware', some say it means 
'does not need an RT kernel', some mean it to say 'needs no sudo make setuid 
step'. Tick any box, and you will have somebody come out with a different 
opinion.
8. The "problem" - IMO a decision to make - at hand therefore is the following:

- do we use elevated privileges for the posix flavor binary, and obtain the 
desired behavior OR
- do we just document the behaviour and be done with it, since current sim 
configs will not trip over this

That is all that is to it. AFAICT, there are no other considerations on the 
table with respect to this decision, in particular not properties of any given 
RTOS.

- Michael
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to