Re: When does `write' return?
- From: "Andrew Xue" <xueruini@xxxxxxxxx>
- Date: 12 Jan 2006 18:52:37 -0800
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
.
- Follow-Ups:
- Re: When does `write' return?
- From: Jean-David Beyer
- Re: When does `write' return?
- References:
- When does `write' return?
- From: Andrew Xue
- Re: When does `write' return?
- From: Jean-David Beyer
- When does `write' return?
- Prev by Date: application software to connect to cell phones?
- Next by Date: Re: application software to connect to cell phones?
- Previous by thread: Re: When does `write' return?
- Next by thread: Re: When does `write' return?
- Index(es):
Relevant Pages
|