EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: How do you know if you are accessing a shared resource?
From: Marty Kraimer <[email protected]>
To: Steven M Beard <[email protected]>
Cc: Epics Questions <[email protected]>
Date: Mon, 26 Jul 1999 10:50:19 -0500
Steven M Beard wrote:

> Now all of a sudden you have three copies of myFunction all sharing the
> same resource, and if the genSub records happen to process at the same
> time there can be a clash. I had a database like this and saw some very
> strange behaviour (a different record generating an "illegal choice"
> message when I tried to write a valid value to one of its inputs) until I
> explicitly protected pgensub->vala with a mutex semaphore. I have the
> following questions:
> 
> 1) How can myFunction tell that the output field it is writing to is
>    connected to a shared resource? This depends on how the database has
>    been connected up.
> 
> 2) Can EPICS handle such resource sharing transparently? It would be a lot
>    easier to deal with if shared links like this are recognised and
>    protected with a mutex semaphore automatically.
> 
>    I am using EPICS 3.12.2. Is the behaviour different in EPICS 3.13?
> 
> 3) Am I missing something? Is there a technique I should be following
>    to protect the shared resource automatically (e.g. using the PHAS field
>    or something similar)?
> 

I am not sure what happened to cause the behavior you describe but it should not
be the result of multiple genSub records executing simultaneously. Lock sets are
designed to prevent such problems. Please read the chapter "Database Locking,
Scanning, and Processing" in the Application Developer's Guide.

Marty Kraimer


References:
How do you know if you are accessing a shared resource? Steven M Beard

Navigate by Date:
Prev: Re: bug in EPICS R3.13 and R3.12---booting vme162 Ralph Lange
Next: mbbiDirect record Leonard J. Reder
Index: 1994  1995  1996  1997  1998  <19992000  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: How do you know if you are accessing a shared resource? Steven M Beard
Next: Re: How do you know if you are accessing a shared resource? William Lupton
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·