What's a system call ( Was: 'what' doesn't use perror...)
Steve Dyer
dyer at spdcc.COM
Sun May 21 11:35:54 AEST 1989
In article <902 at cbnewsc.ATT.COM> danl at 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 at ursa-major.spdcc.com aka {ima,harvard,rayssd,linus,m2c}!spdcc!dyer
dyer at arktouros.mit.edu
More information about the Comp.bugs.sys5
mailing list