[RC5] Remote buffers from command line

Peter Cordes peter at llama.nslug.ns.ca
Fri Jan 28 01:07:46 EST 2000


On Tue, Jan 25, 2000 at 11:16:23PM +0100, Dennis Lubert wrote:

> I have set up a Batch file for Win32 that copies the file to a temporary
> directory does the update, and then moves the file(s) back... this should
> also work with UNC file names, since the flushing is done via the temp-dir...


 Let me get this straight:  you have one 'net connected machine which you
use to update the buffers of some other machines.  It grabs the buffers from
machine x, flushes and fills them, then puts them back?  If this isn't what
you've got, then disregard what I wrote below (except that you probably should
think about the general idea...)

 Good idea.  I think that creates a race condition that if the on the
machine whose file you are updating finishes a block while its buffer files
are being updated by your script, then you'll lose the work it just did, and
you'll do the next work unit twice.  (client will start on it after saving
the old one, but it is still in the copy of the buffer which was made before
you copied the file.)  Maybe you should use move instead of copy, so the
client will do a random block on the probably rare occasions that this
glitch happens.  The script can detect that buff-out exists again, and flush
it instead of overwriting.  This essentially solve the race condition, since
it will take long enough for the client to do the random block that the
script will have time to finish before the client wants _another_ block.
(If not, you would need a trickier algorithm for handling the update...)

-- 
#define X(x,y) x##y
DUPS Secretary ; http://is2.dal.ca/~dups/
Peter Cordes ;  e-mail: X(peter at cordes.phys. , dal.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BCE

--
To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest



More information about the rc5 mailing list