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

Subject: Process ordering in CA and asyn
From: "Pearson, MR (Matthew)" <[email protected]>
To: <[email protected]>
Date: Wed, 20 May 2009 11:23:01 +0100
Hi,

I'm currently investigating a possible race condition in our motor
control software. In our motor controller driver we are setting a
parameter by using a BO record writing to an Asyn port.

Then we are setting a series of other parameters using the Asyn motor
device support layer (via the motor record), which is talking through
the same Asyn port as the BO record.

Then at the end we are setting again the BO record flag.

So my question is really about guaranteeing the process ordering of
these records, as well as making sure that the same ordering is
preserved in Asyn.

I know channel access has a sequence ID that the channel access server
uses to re-order CA events on the IOC, and process them in sequence
order number (is that right?).

On my client side, I do a series of ca_put()s, and call ca_pend_event()
after each one. But I understand that the CA client is not guaranteed to
service the event when calling ca_pend_event(). So is the CA sequence
number assigned to an event at the ca_put() stage, or the at the
ca_pend_event() stage?


Now on to Asyn... The device support layers for the BO and motor records
are connecting to the same Asyn port. Does the asynManager set up
different queues for each device support layer type? Or is it one queue
per port?

I am worried that if there are different queues for the motor records
and the BO record, then it is possible that the processing could be done
out of order in the scan task at this low level, even though processing
was initiated *in* order at the record level.

In the asyn documentation is does say that a thread handling a queue is
dedicated to a specific port, so I think that means that there is indeed
only one queue per port.


Cheers,
Matthew

DLS Controls

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


Replies:
RE: Process ordering in CA and asyn Jeff Hill
RE: Process ordering in CA and asyn Mark Rivers

Navigate by Date:
Prev: RE: Compiling problems building EPICS base 3.14.10 on cygwin-x86 Pacios Rodriguez Luis Orlando
Next: RE: Process ordering in CA and asyn Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Compiling problems building EPICS base 3.14.10 on cygwin-x86 Pacios Rodriguez Luis Orlando
Next: RE: Process ordering in CA and asyn Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·