Re: Why don't have bits the same rights as humans! (flushing to disk waiting time)

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Mon Aug 20 2001 - 06:35:22 EST


Otto Wyss wrote:
>
> I recently wrote some small files to the floppy disk and noticed almost nothing
> happened immediately but after a certain time the floppy actually started
> writing. So this action took more than 30 seconds instead just a few. This
> remembered me of the elevator problem in the kernel. To transfer this example
> into real live: A person who wants to take the elevator has to wait 8 hours
> before the elevator even starts. While probably everyone agrees this is
> ridiculous in real live astonishingly nobody complains about it in case of a disk.
>
> Why don't have bits the same rights as humans! ;-)
>
Bits are in no hurry. If you want to eject - run umount. umount
will flush everything immediately. If you merely want stuff out to
disk - use sync.

Putting writes on hold for a while helps the impossible to foresee
situation when some important reads suddenly comes up. The system don't
_know_ yet it will happen, but it will happen in shorter time than
it takes to write the stuff. So writes are stalled in cache because
you have enough of that, and it is always possible to cache a write.
Reads must be done now and then because they aren't always in cache,
and the kernel tries to keep devices ready to do that on short notice.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:34 EST