The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: wkt@tuhs.org (Warren Toomey)
Subject: [TUHS] Later UNIX syscalls
Date: Sun, 18 May 2008 23:26:06 +1000	[thread overview]
Message-ID: <20080518132606.GA83541@minnie.tuhs.org> (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



             reply	other threads:[~2008-05-18 13:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18 13:26 Warren Toomey [this message]
     [not found] ` <20080518.154005.152643227461321888.cfmd@bredband.net>
2008-05-18 22:03   ` Warren Toomey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080518132606.GA83541@minnie.tuhs.org \
    --to=wkt@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).