The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Later UNIX syscalls
@ 2008-05-18 13:26 Warren Toomey
       [not found] ` <20080518.154005.152643227461321888.cfmd@bredband.net>
  0 siblings, 1 reply; 2+ messages in thread
From: Warren Toomey @ 2008-05-18 13:26 UTC (permalink / raw)


While I'm investigating the legacy of the UNIX syscalls, I might as well
go into the later versions.

2nd Edition UNIX kept all the syscalls of 1st Edition, and added these:

34  hog		lower process priority, becomes nice()
35  sleep	sleep()
36  sync	sync()
37  kill	kill()
38  getcsw	reads console switches: this goes away in 7th Edition

3rd Edition UNIX kept all the syscalls of 2nd Edition, and added these:

39  boot	reboot the system, becomes reboot()
40  fpe		catch floting point errors, becomes signal(SIGFPE, ...)
41  dup		dup()
42  pipe	pipe()
43  times	get process time details, becomes getrusage()

Note pipe() appears in the 3rd Edition, which was still in assembly.
4th Edition UNIX is the first kernel written in C. We start to see changes:

14 mknod	was mkdir(), now can make directories and device files
34 nice		was hog()
20 tell		goes away, as seek() does the same job
44 profil	profil()
45 tiu		interface to Spider digital switching network: goes away
46 setgid	setgid()
47 getgid	getgid()
48 signal	signal()

It's interesting to note that signal() appears, but the existing signal-like
syscalls do not disappear just yet, although tell() does go away. It's also
to note that seek() has the usual 0=SEEK_SET, 1=SEEK_CUR, 2=SEEK_END, but
there are also 3, 4, 5 which mean the same except that offsets are multiplied
by 512 bytes. This is to do long seeks on block devices. Earlier UNIX kernels
automatically multiplied offsets on block devices by 512, but now the task
of doing this has been shifted to the process.

In 5th Edition, we see some more changes:

20  getpid	getpid(), fills the slot vacated by tell()
26  quit	goes away to be replaced with signal(SIGQUIT, ...)
27  intr	goes away to be replaced with signal(SIGINT, ...)
29  cemt	goes away to be replaced with signal(SIGEMT, ...)
33  ilgins	goes away to be replaced with signal(SIGILL, ...)
39  boot	goes away
40  fpe 	goes away to be replaced with signal(SIGFPE, ...)
45  tiu		goes away

6th Edition has few changes over 5th Edition:

26  ptrace	ptrace(), fills the slot vacated by quit()
30  smdate	becomes inoperative

7th Edition has some significant changes over 6th Edition:

27  alarm	alarm(), fills the slot vacated by intr()
29  pause	pause(), fills the slot vacated by cemt()
30  utime	utime(), replaces the missing smdate()
33  access	access(), fills the slot vacated by ilgins()
35  ftime       get date and time, later becomes gettimeofday()
38  getcsw	goes away
39  setpgrp	setpgrp(), but not yet implemented, i.e. reserved slot

49  unused
50  unused
51  sysacct	turn accounting off/on
52  sysphys	set user physical addresses
53  syslock	lock user in core
54  ioctl	ioctl()
55  unused
56  mpxchan	create mpx communications channel
57  unused
58  unused
59  exece	execve(), note that existing syscall 11 exec() has no envp[]
60  umask	umask()
61  chroot	chroot()

Note that 35 sleep() is now gone, as its functionality can be simulated with
27 alarm().

Cheers,
	Warren



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

* [TUHS] Later UNIX syscalls
       [not found] ` <20080518.154005.152643227461321888.cfmd@bredband.net>
@ 2008-05-18 22:03   ` Warren Toomey
  0 siblings, 0 replies; 2+ messages in thread
From: Warren Toomey @ 2008-05-18 22:03 UTC (permalink / raw)


On Sun, May 18, 2008 at 03:40:05PM +0200, Magnus Danielson wrote:
> Warren!
> Thanks for a couple of interesting posts!!!
> Makes me want to read some source... you seems to have it at hand.
> Where is it?

Most of it is here:
http://www.tuhs.org/Archive/PDP-11/Distributions/research/
which includes source for 5th, 6th and 7th Editions, and a kernel
written just before 4th Edition. We don't have 2nd, 3rd, or 4th Edition
source, but the 3rd and 4th Edition manuals are in there.

The source to the 1st Edition UNIX kernel has recently been found in
a paper document, available at 
http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/PreliminaryUnixImplementationDocument_Jun72.pdf.

Cheers,
	Warren



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

end of thread, other threads:[~2008-05-18 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-18 13:26 [TUHS] Later UNIX syscalls Warren Toomey
     [not found] ` <20080518.154005.152643227461321888.cfmd@bredband.net>
2008-05-18 22:03   ` Warren Toomey

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).