Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 

   


   


   















      :: Filmscanners
Filmscanners mailing list archive (filmscanners@halftone.co.uk)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

moving OT file caching and lost log files was filmscanners: Vuescan 7.0.8 hang!



true, that is the default behavior in windows. There are various levels of
cachine on files (not just a windows thing)

-application buffering
  Usually inside either the C runtime library or part of the Java
BufferedReader/Writer classes. Contains a buffer that is written to the OS
file system call a certain size has been reached (ideally a multiple of the
allocation unit size)

-OS file buffering
 Like the above, but in the OS.

-Disk writeback cacheing
 Every write from the OS to a specific sector is not written directly to
disk, it is delayed a little, just in case a write to the same sector
happens immediately afterwards.

-Disk access scheme
 Reads and writes might not physically happen on disk in the order they were
specified (i'm talking multiple processes here, not in an app). This can be
very inefficient as the drive head may be going track1, track 200, track
50,track 25,track75... etc etc. What tends to happen is that the low level
disk driver organizes these into order and prioritises what happens. A dull
subject, but if you are interested, try looking up C-Scan on the net

syncronized or overlapped I/O happens in the app. The app can either wait
for the file function to complete or return immediately (overlapped). Note
that the OS file function completing has potentially nothing to do with
sectors being written though.

also note that the flush file function inside windows AFAIK should write
everything required directly to disk before returning. A last resort for log
files :-)

regards
ned
----- Original Message -----
From: "Bill Ross" <ross@cgl.ucsf.edu>
To <filmscanners@halftone.co.uk>
Sent: Sunday, April 01, 2001 7:45 AM
Subject: Re: filmscanners: Vuescan 7.0.8 hang!


> > Unless Windows is utterly lame (a possibility, granted), it
> > should be possible to flush each line of the logfile to disk
> > as it is written. Files should not disappear just because the
> > machine gets hung/rebooted, so the log should be retrievable.
>
> problem is with all advanced operating systems is that they
> employ a write cache - i.e. sector will only be written after
> a certain amount of time, to allow for a lot of writes to same
> sector (i.e. directory/fat) to not slow the system, this is why
> you will be seeing files 'disappear'. this is
> probably not your problem though..
>
> but, there are functions inside windows to fully flush the file buffers.
>
> In Unix at least, the programmer can open the file for
> synchronous disk access, i.e. the write does not complete
> (the program waits) until the block is flushed, and this
> happens immediately. I expect that Windows allows this too.
>
> Bill Ross
> s




 




Copyright © Lexa Software, 1996-2009.