EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  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  Index 1994  1995  1996  1997  <19981999  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 
<== Date ==> <== Thread ==>

Subject: Re: Proposal for boosted Symb device support
From: Benjamin Franksen <[email protected]>
To: EPICS Techtalk <[email protected]>
Date: Thu, 12 Mar 1998 21:16:16 +0100
Jeff Hill wrote:
> I will still argue that a mutex semaphore should be used in favor of intLock()/intUnlock()
> in task level code. Even if the locking interval is currently quite short, you or some
> other developer who may not be as keen on these issues will invariably
> need to expand the amount of code in-between the lock calls. I hope that
> this person, despite schedule and time pressures, is conscientious and therefore is
> willing to write the additional code require to initialize and use the mutex semaphore.
> I am also concerned about what would happen to the system if for any reason
> an exception was generated (say a floating point exception or a bus error) while 
> intLock() is applied. On some architectures a floating point exception can occur
> when loading an invalid floating point number. The key difference is that intLock()
> is a global operation with side effects on the entire system, and semTake() will only 
> have side effects on tasks using the mutex semaphore. It is much easier to 
> understand (and predict the failure modes of ) a system that is made up of smaller 
> components that minimize their global side effects.

I agree that intLock/intUnlock is dangerous in the situations you
describe. On the other hand: what if you have some external SW package
that you cannot or don't want to modify, and that installs an interrupt
handler that updates your global variable. Then you will have a problem
with the semaphore solution because your SW package does not know
anything about it. I think the Symb device support should be able to
handle such a situation safely.

The argument about affecting the whole system (intLock) vs. small
components (mutex semaphore) is a good one, but mind that we are talking
about a _globally_ visible object that _any_ instance in the system can
modify, even the user from the shell. I see no other way to protect such
a variable globally but by a global mechanism.

Anyway: I'd rather have the Symb support with semaphore protection than
with no protection at all.

	Ben
-- 
The Notorious Neb Nesknarf
-----------------------------------------------------------------------
BESSY II
Berliner Elektronenspeicherring-                phone: +49 30 6392-4865
Gesellschaft fuer Synchrotronstrahlung            fax: +49 30 6392-4859
Rudower Chaussee 5                         email: [email protected]
D-12489 Berlin                       web: http://www.bessy.de/~franksen
-----------------------------------------------------------------------
HOME: Benjamin Franksen, Fichtestr. 19a, D-10967 Berlin, +49(30)6913756
-----------------------------------------------------------------------

Replies:
Re: Proposal for boosted Symb device support Marty Kraimer
References:
RE: Proposal for boosted Symb device support Jeff Hill

Navigate by Date:
Prev: Re: Proposal for boosted Symb device support William Lupton
Next: RE: Proposal for boosted Symb device support Jeff Hill
Index: 1994  1995  1996  1997  <19981999  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: RE: Proposal for boosted Symb device support Jeff Hill
Next: Re: Proposal for boosted Symb device support Marty Kraimer
Index: 1994  1995  1996  1997  <19981999  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 
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 ·