EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: posix osiSpawnDetachedProcess inherits scheduling policy + priority
From: "Hill, Jeff" <[email protected]>
To: Andrew Johnson <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 27 Nov 2012 22:34:43 +0000
> 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.

I'm ok with adding a new function called osiSpawnDefaultAttributeDetachedProcess() for use with starting the ca repeater, and documenting also that the intent of osiSpawnDetachedProcess will be to create a process inheriting most of the calling processes attributes. 

Jeff

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Andrew Johnson
> Sent: Tuesday, November 27, 2012 2:19 PM
> To: [email protected]
> Subject: Re: posix osiSpawnDetachedProcess inherits scheduling policy +
> priority
> 
> 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 Till Straumann
References:
posix osiSpawnDetachedProcess inherits scheduling policy + priority Till Straumann
Re: posix osiSpawnDetachedProcess inherits scheduling policy + priority Andrew Johnson

Navigate by Date:
Prev: Re: posix osiSpawnDetachedProcess inherits scheduling policy + priority Andrew Johnson
Next: Data acquisition for ICP accelerometers Matt Rippa
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: posix osiSpawnDetachedProcess inherits scheduling policy + priority Andrew Johnson
Next: Re: posix osiSpawnDetachedProcess inherits scheduling policy + priority Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·