Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: tom@nikhefk.UUCP (Tom Ploegmakers)
Subject: Re: why three syncs?
Date: 5 Sep 91 08:01:53 GMT	[thread overview]
Message-ID: <1738@nikhefk.UUCP> (raw)
In-Reply-To: 1991Sep04.194822.22074@uvmark.uucp

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


  parent reply	other threads:[~1991-09-05  8:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-09-04 19:48 why three syncs? Tom Rauschenbach
1991-09-04 21:42 ` Steven M Kosloske
1991-09-04 23:54   ` Dirk Grunwald
1991-09-05  2:36     ` Frederick M. Avolio
1991-09-05 19:40       ` Greg Lehey
1991-09-06  5:19       ` John Dodson
1991-09-05 10:11   ` Jose Pina Coelho
1991-09-07  0:32     ` Russell E. Button
1991-09-08 19:42       ` Win Treese
1991-09-10 21:56         ` Plagarism (was Re: why three syncs?) Dana H. Myers
1991-09-11  3:11           ` Win Treese
1991-09-11 14:20             ` J. Horsmeier
1991-09-11 21:01             ` Dana H. Myers
1991-09-09 10:45       ` why three syncs? J. Horsmeier
1991-09-04 22:57 ` Brian Ellis
1991-09-05  8:01 ` Tom Ploegmakers [this message]
1991-09-12 20:33   ` Veteran of the Psychic Wars
1991-09-13  3:32     ` Anthony A. Datri
1991-09-23  3:17       ` Ezra Peisach
     [not found]       ` <1764@geovision.gvc.com>
1991-09-24 19:56         ` Seth Breidbart
1991-09-27  5:14           ` Norman Diamond
1991-09-05 13:45 ` Frank Wortner
1991-09-06 12:03 ` Christopher Samuel
  -- strict thread matches above, loose matches on Subject: below --
1991-09-06 16:19 Steven M. Stadnicki
1991-09-11 11:27 Bruno Pape
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox