On Montag, 2. Februar 2009, Till Straumann wrote:
> Benjamin Franksen wrote:
> > Our idea for an efficient implementation is based on the observation
> > that in a typical EPICS database there are only very few fields per
> > record that actually receive dbPuts (or get updated directly from
> > within base). Only for these fields is it necessary to provide storage
> > for the time of the last update. This storage will be allocated on
> > demand; each record must maintain a (typically very short) list of
> > (field index, timestamp) pairs; let us call it the 'field update list'
> > or short 'update list'. When reading the timestamp for a field, first
> > search the update list and use the contained stamp if one is found,
> > otherwise use the TIME field of the record.
>
> How does that implement (b) ? If a field is never updated,
> shouldn't that field then report the time when iocInit() was
> executed?
Ah, a good objection. It looks as if we need to distinguish between fields
that have
i) never been changed (timestamp = iocInit time)
ii) last been updated by record support (timestamp = record's TIME field)
iii) last been updated via dbPut or from base (timestamp = see update list)
On could use a bit field to distinguish between (i) and (ii or iii). On
dbGet (with timestamp requested) we would have to
- search the update list, if found -> iii
- if not, check the bitfield for i or ii
This increases the memory overhead by an array of noOfRecordFields/8 bytes,
i.e. typically no more than 16 bytes per record (exact number depending on
the record type, of course). Dynamically allocating the array (at init
time) would be simpler (no change to dbToRecordtypeH) at the cost of yet
another pointer sized field. Note: existing record supports work w/o
changes.
Yea, right, implementing the whole proposal is probably not done in a
weekend, as I originally conceived. I still think it is something we should
strive for. What about Ralph's suggestion to offer it as a codeathon
assignment?
Cheers
Ben
- Replies:
- Re: wrong timestamps in monitors Maren Purves
- References:
- wrong timestamps in monitors Benjamin Franksen
- Re: wrong timestamps in monitors Benjamin Franksen
- Re: wrong timestamps in monitors Till Straumann
- Navigate by Date:
- Prev:
Re: wrong timestamps in monitors Andrew Johnson
- Next:
Re: wrong timestamps in monitors Maren Purves
- Index:
1994
1995
1996
1997
1998
1999
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: wrong timestamps in monitors Till Straumann
- Next:
Re: wrong timestamps in monitors Maren Purves
- Index:
1994
1995
1996
1997
1998
1999
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
|