POS
BRIAN SPILSBURY
zhivago@iglou.com
Mon, 12 May 1997 04:55:24 -0400 (EDT)
MD> I mean, in the extreme case, before pushSTACK(obj) actually pushes `obj', it
MD> calls a startTransaction. The push occurs, and then a
MD> endTransaction occurs. Clearly the cost of actually performing
MD> these transactions all the time is very high.
MD>
MD> But why can't `startTransaction' be defined like:
MD>
MD> startTransaction ()
MD> {
MD> markPageAsDirty(StackPointer,PageVector);
MD> transactionCount++;
MD> }
MD>
MD> and `endTransaction' by:
MD>
MD> endTransaction()
MD> {
MD> if (transactionCount > transactionThreshold)
MD> {
MD> commmitDirtyPages(PageVector);
MD> transactionCount = 0;
MD> }
MD> }
MD>
MD>
Sure you can do that, but then what's the point? A transaction becomes
kinda meaningless as we can't assume that any given action has transacted.
We lose our measure of atomicity and imho that's the point of a
transactional bd. If you look at the solution I'm proposing its not
hugely different from your example up there, except that its a more genearl
case, and doesn't try to call page flushes transactions, it reserves that
for world-global synhronization.
Brian