What does sync() _really_ do?
Gordon Burditt
gordon at sneaky.UUCP
Mon Dec 31 11:23:37 AEST 1990
>:If one insists on believing that people are being rational in typing sync
>:three times, that's a great hypothesis. However, it has no basis in fact.
>:While there may a such a sync queue in some kernel somewhere, there isn't one
>:in any of the common kernels that have had triple syncs directed at them.
There were semi-valid reasons for three sync's on a PDP-11/70 running PWB
UNIX (a variant of UNIX V6). This was, of course, a long time ago.
(1) The length of time it took us fumble-fingered superusers to type
"sync<CR>" 3 times ensured enough time for the first sync() to
complete. As far as I know, this depended exclusively on the delay
introduced by human typing speed.
(2) Due to the placement of the keys on a DecWriter, it was distressingly
common to type "sync<DEL>" instead of "sync<CR>", (<DEL> being the
interrupt character) but you usually wouldn't make the same mistake
3 times in a row.
(3) It prevented one guy from typing "sync", then putting one finger on
the <CR> key, one finger on the other hand on the CPU HALT button (or
whatever it was labelled), and pressing them simultaneously.
Gordon L. Burditt
sneaky.lonestar.org!gordon
More information about the Comp.unix.internals
mailing list