EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  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  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: ? Gateway
From: "Jeff Hill" <[email protected]>
To: "'Liyu, Andrei'" <[email protected]>, <[email protected]>
Date: Thu, 9 Sep 2004 14:29:57 -0600
> 	Why will IOC not crash? IOC doesn't free memory and Real-time
> IOC should not do swapping. So IOC will come to memory limit (not only
> low memory block). 

The core IOC software is designed so that very little other than the CA
server and the CA client allocates memory after the IOC initializes. The CA
server and client libraries use free lists for most memory allocations.
Therefore, only large chunks of memory are allocated from pool, memory is
not fragmented, and these libraries tend to have private pools that they use
independent of other codes that maybe allocating memory.

> Then ... I don't know. Maybe IOC will work but anybody 
> couldn't connect to it.

An important design goal was that the scan tasks will not be interrupted,
and existing clients will remain connected and continue to function when the
IOC runs low on memory.

> But I think vxWorks allocates/deallocates memory constantly. So 
> it will stop.

There are many components in vxWorks OS so this is certainly a possibility,
however my understanding is that the core components do not allocate memory
unless the user requests that an object is created. Core vxWorks OS
functionality such as scheduling will continue to function. That is
certainly a desirable behavior (presumably a requirement) for a RT system. 

> 
> 	About Gateway.
> 	I know idea of Gateway. I am interesting if client will not
> deallocate resource that
> 	- Gateway takes care itself and IOC.
> OR
> 	- Gateway will not take care itself and IOC.
> There are other solutions Gateway takes care itself or IOC but it is
> less real.

There are several ways that allocated resources are cleaned up if the CA
client side application code neglects to do this.

o The CA client library cleans up all allocated resources when the user
calls ca_context_destroy (or ca_task_exit). This includes any resources that
may have been allocated in the server on behalf of the client.

o The CA server cleans up any resources allocated on behalf of the client
that remain when the circuit to this client hangs up.

Also, the GW cleans up its process variable cache if no client of the GW has
used an entry in this cache for a reasonably long interval. This includes
any channels/subscriptions/circuits that it may have established with the
IOC.

> 
> 	Why am I interesting?
> SNS accelerator has started and I don't like to stop IOC. If I will
> connect/stop to 100 PVs and 100 times per day that I could come to IOC
> memory limit.
> 

Memory limits in the IOC should be based on the current number of clients
and channels, and not on the aggregated number of client connect/disconnect
cycles. 

Nevertheless, don't take the above clarification as advice to setup a system
w/o gateways. Gateways are certainly a sound design decision when there is a
need to isolate clients from IOCs. 

Jeff




References:
RE: ? Gateway Liyu, Andrei

Navigate by Date:
Prev: RE: ? Gateway Liyu, Andrei
Next: Errors when stalling seq-2.0.7 on cygwin 胡勇
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: ? Gateway Liyu, Andrei
Next: Errors when stalling seq-2.0.7 on cygwin 胡勇
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  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 ·