[TUHS] UINX Program Description: For V6 Unix.
segaloco via TUHS
tuhs at tuhs.org
Sat Jan 3 05:33:11 AEST 2026
On Friday, January 2nd, 2026 at 10:53, Rik Farrow via TUHS <tuhs at tuhs.org> wrote:
> Thanks, that's actually very interesting. One the second page, update() is
> described as including a lock to prevent it being called a second time
> before the first call is completed. That explained to me the lore I picked
> up at UC Berkeley about typing "sync;sync". I wondered why it was necessary
> to use sync twice, and the answer is that it's not: the first invocation
> appears to return immediately but invoked sync the second time waits until
> the first finishes--so you can tell updating of inodes and superblocks has
> completed.
>
> Rik
I've seen this sort of thing in plenty of places, an operation that is gated by itself, run it twice in case the gate was closed the first time or otherwise you need to be sure the first one finished. On the NES, this is done to synchronize the PPU chip in software by awaiting v blank twice. The first is actually to erase any potential spurious interrupt flag and the second to then poll knowing you started with the flag down.
Is there a name for this? I want to just call this sempahoring but it may be that a binary semaphore is a case of this larger thing.
> On Fri, Jan 2, 2026 at 11:40 AM David Barto via TUHS tuhs at tuhs.org wrote:
>
> > May I suggest that the following is a good read for V6 internals. Without
> > source, and a well written description of functions.
> >
> > David
> >
> > https://archive.org/details/unix_program_description_jan_1976/page/n5/mode/2up
> > 
> > UNIX Program Description : Bell Telephone Laboratiories, Incorporated :
> > Free Download, Borrow, and Streaming : Internet Archive
> > archive.org
> >
For those following along at home, this specifically describes the USG Program Generic II kernel, so may have slight differences regarding stock V6 (and/or stock PDP-11/45 C kernel <xyz>). Does anyone on-list know the providence of this document by the way? The scan edges indicate it came from a comb-bound volume, I'd be curious if these were the only pages, if that volume contained other UNIX stuff, and especially if this implies other comb-binding of manuals at the time.
Reason I ask is I seem to recall reading a post here or on a Usenet list by Ted Dolotta I believe detailing that the Release 3.0 manuals got approval to be printed on the same comb-bound stock used for internal phone directories, and that it was the first time USG had "published" a manual so formally. Seeing the comb-binding holes in the scan casts some doubt on this.
- Matt G.
More information about the TUHS
mailing list