[RC5] LIFO? Is this true?

Phil Gregory pgreg430 at neors.cat.cc.md.us
Fri May 8 00:09:04 EDT 1998


> >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.

The problems are in what to do after you've finished a block and where new
blocks go.  After you've finished a LIFO block, you just move the file
pointer back to point to the block before it.  The finished block can be
discarded and/or ignored.  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.  When blocks are added, where are they
added?  LIFO always adds at the end--very easy.  FIFO rewriting the file
every time also adds them at the end of the file, but the constant
rewriting is bad anyway.  The other scenario for a FIFO either adds at
the end or the beginning.  If at the end, then the file keeps growing and
growing.  If at the beginning, what do you do if you have more blocks than
room for them?

In short, LIFO is a lot easier to implement.  I'd rather that the coders
put their work into setting up v3 and keeping the creeping featureitis in
the current clients to a minimum.

Windows 95 --- The only OS with the Year 2000 bug built into its name
                                 Phil Gregory
                              phil_g at geocities.com
                         (E-mail me for my public key)

Version: 2.6.2

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