All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-help] POSIX Skin: Changing scheduling parameters of threads in other processes
@ 2007-08-10 14:16 Torsten Kröger
  2007-08-10 14:28 ` Gilles Chanteperdrix
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Torsten Kröger @ 2007-08-10 14:16 UTC (permalink / raw)
  To: xenomai

Hi everyone,

to summarize my discussion form yesterday:

1. I would like to implement 'real' synchronous message passing using
the posix skin. 'Real' synchronous message passing shall mean that a
receiver _always_ inherits the priority of the sender. Right now, I
think this is not possible. Please let me know, if anyone knows a
possibility.
 
2. 'Real' synchronous message passing could be realized with the native
skin, because here a sender RT_TASK is able to change the priority of a
blocked receiver RT_TASK before sending a message to it. Is this
correct? If yes, I might consider changing the skin.

3. Is there a possibility of using the native skin and the posix skin at
the same time?

4. I guess, it more a philosophical question: wouldn't another concept
of send/receive/reply-messaging lead to a general avoidance of priority
inversion? This is surely not an easy point regarding its
implementation, but when looking at long-term aims of the Xenomai
project, this might be a point, which worth to discuss about -
especially when heading for distributed systems, where
send/receive/reply-messaging is one of the key methodologies for
real-time systems.


Any reply posting is highly appreciated again :-)
 

Best regards,
Torsten



^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: [Xenomai-help] POSIX Skin: Changing scheduling parameters ofthreads in other processes
@ 2007-08-09 14:18 Philippe Gerum
  2007-08-09 18:37 ` [Xenomai-help] POSIX Skin: Changing scheduling parameters of threads " Torsten Kröger
  0 siblings, 1 reply; 14+ messages in thread
From: Philippe Gerum @ 2007-08-09 14:18 UTC (permalink / raw)
  To: Torsten Kröger; +Cc: xenomai

On Thu, 2007-08-09 at 15:06 +0200, Torsten Kröger wrote:
> >> this is my first email to this list, and I would like to start with a
> >> question. I use the posix skin of Xenomai 2.3.1, and I have several
> >> processes running, each consisting of several threads. Is there a
> >> possibility for a thread A1 running in process A to change the
> >> scheduling parameters, in particular the priority, of a thread B1
> >> running in process B?
> >>
> >> Regarding the posix specification I cannot find this functionality
> there
> >> and so I guess there is no way doing it with
> "pthread_setschedparam()".
> >> But is there another possibility?
> >
> >No, the only way you could do that is by using an IPC to pass the
> >request from a process to another. You could use message queues for
> >that.
> >
> 
> Thanks for this immediate answer. I just read some parts of the posix
> specification, and if I'm not mistaking posix message queues do not
> inherit thread priorities. They only sort messages in (message-)priority
> order. I guess you mean synchronous message passing provided by
> rt_task_send(), rt_task_receive(), and rt_task_reply() in the native
> API. This would of course be an alternative. But therefore I would have
> to port many code to the native API. Would then be possible to let one
> RT_TASK change the prioriy of any other RT_TASK by simply calling
> rt_task_set_priority()? 
> 
> Regarding send/receive/reply messaging with the native API, I am not
> sure if I detected a mistake in the implementation (file
> ksrc/skins/native/task.c). When a sender RT_TASK sends a message to a
> receiver RT_TASK, then the priority is only inherited, if the receiver's
> priority is lower than the one of the sender. For my understanding, the
> priority should be inherited in any case.
> 
> >From the reception of a message till the call of rt_task_reply() the
> receiver RT_TASK works for the sender and should get its priority.
> Otherwise we would have a priority inversion at this point, because any
> RT_TASK with a priority between the sender and receiver priority would
> now be blocked by the receiver (which works for the lower prioritized
> sender at its old priority).
> 

You are supposed to pick the right base priority for the server in the
first place so this case never arises. Any other behaviour than the
strict priority inheritance protocol would be broken by design because a
server might sleep while processing a request and requests might pile up
(try with two senders having different priorities, highest priority
first, and server entering a blocked state in the middle of its
processing for the first request).

> 
> Many many thanks in advance for your help,
> Torsten
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
-- 
Philippe.




^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <mailman.2979.1186650741.22887.xenomai@xenomai.org>]

end of thread, other threads:[~2007-08-17  8:19 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 14:16 [Xenomai-help] POSIX Skin: Changing scheduling parameters of threads in other processes Torsten Kröger
2007-08-10 14:28 ` Gilles Chanteperdrix
2007-08-10 14:45 ` Jan Kiszka
2007-08-10 15:11   ` Gilles Chanteperdrix
2007-08-10 15:12 ` Herman Bruyninckx
2007-08-12 15:17   ` Torsten Kröger
2007-08-12 17:56     ` Jan Kiszka
2007-08-14 21:31       ` Torsten Kröger
2007-08-15 17:27         ` Jan Kiszka
2007-08-16  9:19           ` Torsten Kröger
2007-08-17  8:19             ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2007-08-09 14:18 [Xenomai-help] POSIX Skin: Changing scheduling parameters ofthreads " Philippe Gerum
2007-08-09 18:37 ` [Xenomai-help] POSIX Skin: Changing scheduling parameters of threads " Torsten Kröger
     [not found] <mailman.2979.1186650741.22887.xenomai@xenomai.org>
2007-08-09  9:41 ` Torsten Kröger
2007-08-09 10:33   ` Gilles Chanteperdrix

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.