EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Re: ioc daemon
From: "J. Frederick Bartlett" <[email protected]>
To: Christophe Moins <[email protected]>
Cc: [email protected]
Date: Thu, 08 Jun 2006 10:31:46 -0500
Christophe,

  Your note does not indicate which operating system you are using; so, my response to your question will be a general one.

  Since most IOC's have a real-time operating system (RTOS), there is no need to create a daemon process (classically, a process that has no parent) to achieve your ends. One characteristic of an RTOS compared, say, with Linux is that the RTOS scheduling algorithm is usually based on task or thread priorities with preemption of lower priority tasks by higher ones. Each task or thread runs independently of the others and non-interference between tasks is guaranteed by semaphores and other RT synchronization mechanisms, e.g. queues or events.

  So, instead of creating a daemon process, the usual practice on a RTOS is to create a new execution thread that runs your "daemon" program and use the RTOS synchronization objects to control and communicate with it. EPICS works this way and many of the extensions to EPICS that I have built also follow this model.
Fritz

Christophe Moins wrote:
Hello,

I would like to daemonize an ioc process but I have not managed to do it till now.
I tried to implement the classical solution by using the fork and setsid routines but then the readout is not correctly performed  by the ioc.
Is there a simple way to do it ?

Thanks
Christophe


-- 
J. Frederick Bartlett
Fermi National Accelerator Laboratory
D0 Experiment/Controls

[email protected]
630-840-4058

 

References:
ioc daemon Christophe Moins

Navigate by Date:
Prev: Re: ioc daemon Eric Norum
Next: Re: ioc daemon Rod Nussbaumer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ioc daemon David Kline
Next: How to send "\x0" through asyn btanu
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024