Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!ira.uka.de!fauern!opal!tmpmbx!utopia!sunrise!hotte From: hotte@sunrise.in-berlin.de (Horst Laumer) Newsgroups: comp.unix.internals Subject: Re: What does sync() _really_ do? Message-ID: Date: 17 Dec 90 08:39:50 GMT References: Organization: HL EDV-Beratung Lines: 32 steinar@ifi.uio.no (Steinar Kj{rnsr|d) writes: >The above subject and imposed question may seem trivial, but I have so far >failed to find the answer (I browsed through the 4.3 book by McKusick, Karels >and Quarterman, references to pertinent pages here are welcome). The question >arised when a disk vendor presented results from a benchmark which purpose >was to measure read/write transfer rates for his drive. His scenario >was this: > - a stand alone BSD (SunOS 4.0.3 I think) box in single user mode > - no other disk activity in the system >The test program looked something like this: > - > - sync(); sync(); sync(); > - > As stated in the AT&T SysV Programmer, sync(2) is used to write memory to disk *and* actualize the superblock. Thus, the succeeding read() ought to find the file correctly, because the last blocks and superblock where flushed to disk. sync(1/1M) is simply the same, but as stand-alone binary. --HL -- ============================================================================ Horst Laumer, Kantstrasse 107, D-1000 Berlin 12 ! Bang-Adress: Junk-Food INET: hotte@sunrise.in-berlin.de ! for Autorouters -- me -- UUCP: ..unido!fub!geminix!sunrise.in-berlin.de!hotte