Subject: |
Re: posix osiSpawnDetachedProcess inherits scheduling policy + priority |
From: |
Andrew Johnson <[email protected]> |
To: |
[email protected] |
Date: |
Tue, 27 Nov 2012 15:18:36 -0600 |
Hi Till,
On 2012-11-26 Till Straumann wrote:
> The current implementation of posix/osiSpawnDetachedProcess()
> basically just forks and execs. The new process inherits the
> scheduling policy and priority of whoever called spawnDetachedProcess().
>
> This means e.g., that a caRepeater spawned by a "real-time enabled"
> IOC application executes under SCHED_FIFO with priority 51.
>
> Not sure this is a good thing. IMO osiSpawnDetachedProcess()
> should be fixed so that the new process starts out with SCHED_OTHER.
I doubt if there are many users of osiSpawnDetachedProcess() other than the
caRepeater, but I wouldn't want to break any that do exist which need to
inherit the SCHED_FIFO setting. If the child process of the fork() were to
change to SCHED_OTHER before calling execlp() the new program might not have
the privilege necessary to switch back — is that correct?
Personally I would solve the problem of having an RT-scheduled caRepeater by
ensuring that caRepeater always gets started when the system comes up before
the IOCs get run, say from an /etc/init.d script.
We could add another API that switches to SCHED_OTHER before the execlp() and
use that when starting the caRepeater, but I'm not sure about portability.
What do you think?
- Andrew
--
Computer science is as much about computers as astronomy is about
telescopes. -- Edsger Dijkstra
- Replies:
- RE: posix osiSpawnDetachedProcess inherits scheduling policy + priority Hill, Jeff
- Re: posix osiSpawnDetachedProcess inherits scheduling policy + priority Till Straumann
- References:
- posix osiSpawnDetachedProcess inherits scheduling policy + priority Till Straumann
- Navigate by Date:
- Prev:
Re: caRepeater object code not cross-compiled in R3.14.12.2 Andrew Johnson
- Next:
RE: posix osiSpawnDetachedProcess inherits scheduling policy + priority Hill, Jeff
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
posix osiSpawnDetachedProcess inherits scheduling policy + priority Till Straumann
- Next:
RE: posix osiSpawnDetachedProcess inherits scheduling policy + priority Hill, Jeff
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|