Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!tut.cis.ohio-state.edu!husc6!spdcc!dyer From: dyer@spdcc.COM (Steve Dyer) Newsgroups: comp.bugs.sys5 Subject: Re: What's a system call ( Was: 'what' doesn't use perror...) Message-ID: <3297@ursa-major.SPDCC.COM> Date: 21 May 89 01:35:54 GMT References: <3759@sugar.hackercorp.com] <10156@smoke.BRL.MIL] <1232@netcom.UUCP> <225@jetson.UPMA.MD.US> <902@cbnewsc.ATT.COM> Reply-To: dyer@ursa-major.spdcc.COM (Steve Dyer) Organization: S.P. Dyer Computer Consulting, Cambridge MA Lines: 21 In article <902@cbnewsc.ATT.COM> danl@cbnewsc.ATT.COM (daniel.r.levy) writes: >Someone mentioned making sleep() a true system call. I can see good reasons >for this. In V6 and earlier UNIXes, sleep() was indeed a system call. Unfortunately, its implementation was such that every sleeping process got a wakeup when a sleep expired. tout was an int vector (no longs then!) containing the absolute second at which time the first sleeping process was to wake up. If that was reached in the one-per-sec part of the clock routine, a wakeup was performed on tout. Every process in the sleep system call would check to see whether ITS timer had expired or not, and if not, go back to sleep. The address space limitations on the 11/40-class machines probably suggested this implementation as well as the still-current and more efficient alarm()/ pause() implementation. Alarm() and pause() weren't introduced until PWB. They weren't in V6. -- Steve Dyer dyer@ursa-major.spdcc.com aka {ima,harvard,rayssd,linus,m2c}!spdcc!dyer dyer@arktouros.mit.edu