On Mon, 25 Aug 2003, James Giles wrote:
> Yes, there are many cases where flushing is necessary on old or
> poorly designed systems. But, requiring application programmers
> to know when and where those cases are is the crux of the problem.
>
> The system can *always* discover such things. Few systems even
> provide a way for applications to find out whether it needs to
> flush or not. As a result, you must flush at any point where it
> simply *might* be necessary. Why have buffers in the system at
> all?
Hi,
For us it is obvious which files need flushing and which don't. We output
large text files of grid values which the user can give to gnuplot,
mathematica, etc. For writing those files it's up to the system to deal
with. We also have a file that we print status information to, which we
manually flush after each line so we can watch it with tail -f. It is
annoying when this file gets written in blocks every couple of hours. If
the system periodically flushes idle buffers that contain data, then we
wouldn't have to do that. Doing this every 10 seconds or so shouldn't
affect performance. I haven't seen such a system though. Alas we are
stuck with manual flushing.
Regards,
Daniel.
------------------------------------------------------------------------
Dr. Daniel Grimwood Department of Chemistry
Email : [log in to unmask] The University of Western Australia
Phone : +61 8 93808563 35 Stirling Highway
Fax : +61 8 93801005 Crawley WA 6009
|