Message from discussion why three syncs?
From: t...@nikhefk.UUCP (Tom Ploegmakers)
Subject: Re: why three syncs?
Keywords: bellman sync three
Date: 5 Sep 91 08:01:53 GMT
Sender: Tom Ploegmakers <t...@nikhefk.nikhef.nl>
Reply-To: t...@nikhefk.UUCP (Tom Ploegmakers)
Organization: Nikhef-K, Amsterdam (the Netherlands).
In article <1991Sep04.194822.22...@uvmark.uucp> t...@uvmark.uucp (Tom Rauschenbach) writes:
>I've noticed that most Un*x folks type the sync command three times before
>shutting down a system. Is there a folkloric reason for this ? A technical
>one. I have a guess, and I wonder if it can be confirmed or refuted.
The reason i know for doing more than a single sync is that sync
is performed asynchonously by the kernel. When the command
returns the sync operation is not yet finished. So If you halt
immediatly after that you would still have incorrect filesystems
on disk. When memories were small the sync would be completed by
the time you had typed anything, so why not a second sync?
A second sync would not make your filesystems any better because
there will not be found any blocks in the buffer cache that need
When memories, and buffer caches, grew bigger this was no
guarantee anymore. I heard about a Convex that spend tens of
seconds syncing after doing lots of installaion work single user.
Modern unixes, at least bsd's, always sync when you halt them,
even when they panic. But i still have the old sync, sync, jalt
on my fingertips.
tom ploegmakers NIKHEF/K-CSG (t...@nikhefk.nikhef.nl)
po.box 4395, 1009 AJ Amsterdam, the Netherlands.
phone: -31 20 5922035