From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd705,2481588b2317173b X-Google-Attributes: gidfd705,public X-Google-Thread: 1164f8,2481588b2317173b X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1991-09-06 00:04:22 PST Path: gmdzi!unido!mcsun!hp4nl!nikhefk!tom From: tom@nikhefk.UUCP (Tom Ploegmakers) Newsgroups: alt.folklore.computers,comp.sys.dec Subject: Re: why three syncs? Keywords: bellman sync three Message-ID: <1738@nikhefk.UUCP> Date: 5 Sep 91 08:01:53 GMT References: <1991Sep04.194822.22074@uvmark.uucp> Sender: Tom Ploegmakers Reply-To: tom@nikhefk.UUCP (Tom Ploegmakers) Organization: Nikhef-K, Amsterdam (the Netherlands). Xref: gmdzi alt.folklore.computers:33444 comp.sys.dec:25176 In article <1991Sep04.194822.22074@uvmark.uucp> tom@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 syncing. 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 (tom@nikhefk.nikhef.nl) po.box 4395, 1009 AJ Amsterdam, the Netherlands. phone: -31 20 5922035