[RC5] LIFO? Is this true?

mkw mkw at att.net
Fri May 8 12:29:41 EDT 1998

Phil Gregory wrote:
> > >It was designed this way because most operating systems don't readily
> > >support FIFO files, and LIFO is much easier to impliment from a coding
> > >standpoint. Have no fear, v3 will be FIFO... :)
> >
> > Well... Most operating systems don't support LIFO either.  They support
> > sequential reads/writes and positioning to a specific byte offset.  FIFO
> > takes about 10 minutes of extra coding compared to LIFO.
> After you've finished a FIFO block, you either
> move the file pointer forward and leave some dead space at the beginning
> of the file or rewrite the entire file to remove the dead space.  The
> latter obviously causes a performance hit, especially with large buff-ins.
> The former, aside from being a really bad use of space, causes major
> problems when new blocks are added.  

The way I'd remove a block from a FIFO buffer is to fill it with zeros, then
compare total dead space to total file size and rewrite the entire file if
dead space exceeds 50%. 

Besides, from what I understand, FIFO buffering code has already been
written for the personal proxies anyway. Would it really be that much
trouble to re-use that code for the clients? 

I would guess that at least 95% of all unreturned blocks are due to LIFO
buffering by clients running in lurk mode; thus LIFO vs. FIFO is everything
but trivial.

Michael                        [writing to you from 40°15'37"N 74°57'49"W]
*       Michael K. Weise           Helping to get American products      *
* German Localization Services         ready for German-speaking markets *
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