Re: When does `write' return?




Jean-David Beyer 写道:

>
> It depends on a coupla things. If you have much more than 1GBytes of ram,
> the write could return as soon as the data get to a memory buffer. Possibly
> some of the cache would have to be paged out, but not necessarily.
>
My ram is a little bit large, 4GB. And my biggest test file is 1.8GB,
so I think
it's cached entirely.

> It also depends if file fd is a raw file or not (if you are using raw file
> systems, you probably already know enough to answer your questions; so
> probably not a raw file). If it is, I believe you must wait until the write
> completes, but OTOH, you do not need to take the time to find system buffer
> space and copy from user space to system space, and you might be able to do
> it in a giant "spiral write" as DEC used to call it. Depends on hardware and
> the low level driver, I would expect.
Could you please explain it in more details? I could not find anything
about "spiral write" by google. Does it mean something of
copy-on-write?

Best Regards

Andrew Xue

.



Relevant Pages

  • Re: When does `write return?
    ... >> ram, the write could return as soon as the data get to a memory buffer. ... so probably not a raw file). ... Their disks had 512-byte sectors and UNIX at the time normally read in one ... the whole cylinder and do an automatic seek with no intervention from the OS ...
    (comp.os.linux.misc)
  • Re: laptop shuts down when opening up raw files with photoshop cs2
    ... >xp pro ... >only the one shuts right down after opening up a raw file to bring into ... >the preferences are set to %55 ram to be used for ps. ...
    (microsoft.public.windowsxp.help_and_support)