From: "Torsten Kröger" <t.kroeger@domain.hid>
To: xenomai@xenomai.org
Subject: Re: [Xenomai-help] POSIX Skin: Changing scheduling parameters ofthreads in other processes
Date: Thu, 9 Aug 2007 15:06:41 +0200 [thread overview]
Message-ID: <000901c7da86$2171afc0$c124a986@domain.hid> (raw)
In-Reply-To: <18106.60807.692746.230882@domain.hid>
>> 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).
Many many thanks in advance for your help,
Torsten
next prev parent reply other threads:[~2007-08-09 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2979.1186650741.22887.xenomai@xenomai.org>
2007-08-09 9:41 ` [Xenomai-help] POSIX Skin: Changing scheduling parameters of threads in other processes Torsten Kröger
2007-08-09 10:33 ` Gilles Chanteperdrix
2007-08-09 13:06 ` Torsten Kröger [this message]
2007-08-09 13:14 ` [Xenomai-help] POSIX Skin: Changing scheduling parameters ofthreads " Gilles Chanteperdrix
2007-08-09 13:32 ` Torsten Kröger
2007-08-09 13:51 ` Gilles Chanteperdrix
2007-08-09 14:27 ` Torsten Kröger
2007-08-09 14:18 ` Philippe Gerum
2007-08-09 18:37 ` [Xenomai-help] POSIX Skin: Changing scheduling parameters of threads " Torsten Kröger
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='000901c7da86$2171afc0$c124a986@domain.hid' \
--to=t.kroeger@domain.hid \
--cc=xenomai@xenomai.org \
/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 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.