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: RE: Process ordering in CA and asyn
From: "Jeff Hill" <[email protected]>
To: "'Pearson, MR \(Matthew\)'" <[email protected]>, <[email protected]>
Date: Wed, 20 May 2009 18:21:26 -0600
> 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?).

The CA UDP frames have a sequence number, but this is applicable only to
search requests and beacon messages.

Concerning ca put requests:
O All CA put requests are _initiated_ with the database in the IOC in
exactly the same order as they are received by the CA client library.
However, the behavior is more complex once you look at what happens after
the request is initiated in the database. 
O If it's a CA put request then the requests are initiated asynchronously.
That is they are initiated independently of when they complete. If the
database record has asynchronous processing in progress when the put occurs
then the record is processed again with the most recent value (potentially
replaced by a put occurring while the record is finishing asynchronous
processing in progress).
O If it's a CA put callback request then each and every request is executed
by the database, but the order of execution (in the database) can change
subtly depending on whether the device support of the record (or records it
forward links to) has asynchronous completion. In summary, in the IOC a
subsequent CA put request for record A can be initiated with the database
while we are waiting for a previous put request for a record B that has
asynchronous completion to complete. If there is a subsequent put callback
request for a record B, that already has a put callback request in progress,
then the CA server will block processing of further requests from that
client until any put callback request in progress with record B completes.
O The client side application will block if the put request generation rate
exceeds the put request consumption rate of the database.

> 
> 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(). 

The ca_pend_event() will cause a CA flush to occur. That causes requests
that are queued in the client library to be flushed to the TCP pipe. In
non-preemptive callback mode the ca_pend_event() call will also cause
pending response callbacks to be executed.

> So is the CA sequence
> number assigned to an event at the ca_put() stage, or the at the
> ca_pend_event() stage?

The sequence numbers apply to UDP based search and beacon request frames
only. With the TCP based put requests put request initiation  ordering is
preserved by a combination of the TCP implementation and also the
implementation of the CA client and server libraries.

HTH,

Jeff 


Replies:
RE: Process ordering in CA and asyn Rees, NP (Nick)
References:
Process ordering in CA and asyn Pearson, MR (Matthew)

Navigate by Date:
Prev: Process ordering in CA and asyn Pearson, MR (Matthew)
Next: Can the saveData config file referencence another file? Mark Bennett
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: Process ordering in CA and asyn Pearson, MR (Matthew)
Next: RE: Process ordering in CA and asyn Rees, NP (Nick)
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 ·