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  <20112012  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  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Mutex at the record level?
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Fri, 3 Jun 2011 17:03:09 -0500
Hi Mathias,

On 2011-06-03 Steiner, Mathias wrote:
> I have a softIOC with a shared-resource problem.
> A couple dozen 'sub' records need access to the same file.
> I would like to put a mutex around the file access, but I'm stumped as to
> where the corresoponding variable should be defined.
> 
> It seems to me that it has to go one level "up" from the subroutine.
> So my question is:  Where to park the '->lock' ?

Doing file access from a subroutine record or (device support for that matter) 
is really not a good idea; you're breaking the rule that record processing 
code should never block for any significant period of time.

What are these records doing with the file?  The usual way we do file I/O is 
to write a sequence program that handles all the file operations, and have the 
sequence interact with any necessary records inside the database.  Can you 
rework your design to follow that model?  We don't have a solution to what 
you're asking because it's not compatible with the IOC's processing model.

- Andrew
-- 
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham

References:
Mutex at the record level? Steiner, Mathias

Navigate by Date:
Prev: RE: cross compiler error Jeff Hill
Next: RE: asyn driver on Windows XP Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Mutex at the record level? Steiner, Mathias
Next: Compiling Problem windows Brands Helge
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  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 ·