The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Sleep()y musings
@ 2018-03-06 18:11 Noel Chiappa
  2018-03-06 20:53 ` Clem Cole
  0 siblings, 1 reply; 8+ messages in thread
From: Noel Chiappa @ 2018-03-06 18:11 UTC (permalink / raw)


    > From: Dave Horsfall

    > When did sleep(2) become sleep(3)?  Was it V7, or some BSD?

Before V7. The MIT system (~PWB1) says, on the man page for sleep (II), "As of
this writing the system call is still available although the C routine
implmeneting the function uses 'alarm' and 'pause' (II). It will be withdrawn
when convenient."

Probably left the system call there for compiled commands, etc which used it?

	 Noel


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [TUHS] Sleep()y musings
@ 2018-03-08  3:39 Rudi Blom
  0 siblings, 0 replies; 8+ messages in thread
From: Rudi Blom @ 2018-03-08  3:39 UTC (permalink / raw)


>Date: Wed, 7 Mar 2018 13:54:32 -0500
>From: Paul Winalski <paul.winalski at gmail.com>
>To: Clem Cole <clemc at ccc.com>
>Cc: The Eunuchs Hysterical Society <tuhs at tuhs.org>
>Subject: Re: [TUHS] Sleep()y musings
>Message-ID:
>        <CABH=_VTO7sdgGypp3U7zQoWdJ3HsGUUjrk->6_Rf5VE5gyNGD7g at mail.gmail.com>
>Content-Type: text/plain; charset="UTF-8"
>
>...
>VAX also has a Time-of-Year Clock Register (colloquially called the
>TOY clock), a 32-bit unsigned value whose LSB represents a resolution
>of 10 milliseconds (0.01 second).  All VAX models except the
>VAX-11/730 provided battery backup for the TOY clock so that it
>continued to operate even when the system was powered off.  A VAX can
>thus be powered off for about 497 days and still remember the
>date/time.

Also in AlphaServers we still have this TOY, the clock and the battery that is.
From a DS10 running Digital Unix 4.0G, /var/adm/messages file, I only
removed the BEL characters

Dec 12 03:01:27 br0011 vmunix: You must reset the system time manually
Dec 12 03:01:27 br0011 vmunix: Time of year (TOY) clock returned zero
as the current time
Dec 12 03:01:27 br0011 vmunix:
Dec 12 03:01:27 br0011 vmunix:
Dec 12 03:01:27 br0011 vmunix: WARNING: preposterous time in TOY clock
-- CHECK AND RESET THE DATE!!
Dec 12 03:01:27 br0011 vmunix:
Dec 12 03:01:27 br0011 vmunix: i2c: Server Management Hardware Present
Dec 12 03:01:27 br0011 vmunix: datalink: links=128, macs=6
Dec 12 03:01:27 br0011 vmunix: NOTE: dxb_configure: Configure values:
dxb, ffffffffffffff9d, ffffffff90bfbf80, ffffffff90bf9a20
Dec 12 03:01:27 br0011 vmunix: WARNING: dxb_configure:
configure_driver error = 22
Dec 12 03:01:28 br0011 vmunix: Node ID is 00-10-64-30-ae-38 (from device tu0)
Dec 12 03:01:28 br0011 vmunix: WARNING: Time of year (TOY) clock
battery is dead, time and NVR contents ignored
Dec 12 03:01:28 br0011 vmunix:
Dec 12 03:01:28 br0011 vmunix: You must reset the system time manually

Cheers,
uncle rubl


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [TUHS] Sleep()y musings
@ 2018-03-06 17:58 Dave Horsfall
  2018-03-08 21:50 ` Dave Horsfall
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Horsfall @ 2018-03-06 17:58 UTC (permalink / raw)


Back when the dinosaurs were using card readers (and yes, I've used a card 
reader on Unix; I think it was a desktop CDC model, and the driver would 
handle two modes: strict 80-column i.e. one 12-bit column per 16-bit word 
and you got 80 of 'em on a DMA channel, or ASCII NL-terminated after last 
non-blank column, and no, I have no idea whether it handled EBCDIC or CDC 
etc, but I digress as usual).

Where was I?  Oh yes, sleeps...

Back when sleep(3) was sleep(2) (yes, Virginia, sleep() used to be a 
system call, then it became alarm()/pause(), and now it seems to be 
nanosleep(), and I'm wandering again), you never called sleep(1) because 
its granularity was +/-1 second (and all the way up to +infinity, 
actually, on a really busy machine), thus it could return right away, with 
ensuing hilarity.

So, I'm curious:

When did sleep(2) become sleep(3)?  Was it V7, or some BSD?  Or Babbage 
help me, SysVile?

When did the caveat about sleeping for 1 second become known?  I don't 
think that I ever saw it documented, but was one of those "lore" things 
passed around at Unix conferences and the like.

And when did it start using nanosleep() instead of alarm()/pause()?  I see 
that my Penguin box has a bet both ways; it "may" use SIGALRM[a] (thus 
"mixing calls to alarm(2) and sleep() is a bad idea" (well, I've used 
both), and also refers to nanosleep().

[a]
Alpine's spell-checker suggested "SICKROOM" here; pretty close when 
dealing with timed-out reads on a TTY connection[ii] :-)

[ii]
Have you tried this with Perl?  You can't rely on EINTR[3], so you have to 
use eval{} blocks instead, and it starts getting pretty fugly...

[3]
And here it suggested "ENTREE".

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-08 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06 18:11 [TUHS] Sleep()y musings Noel Chiappa
2018-03-06 20:53 ` Clem Cole
2018-03-06 21:39   ` Paul Winalski
2018-03-07 16:33     ` Michael Kjörling
2018-03-07 18:54   ` Paul Winalski
  -- strict thread matches above, loose matches on Subject: below --
2018-03-08  3:39 Rudi Blom
2018-03-06 17:58 Dave Horsfall
2018-03-08 21:50 ` Dave Horsfall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).