Working with the 1st Edition UNIX code has been a blast. I just thought I'd
quickly summarise the features of the 1st Edition. It's quite amazing the
system that had been written by the end of 1971:
- a multitasking system with up to 16 processes
- multiple users
- a hierachical filesystem, with empty directories used as mountpoints
- read/write file protection for user/other (no group), plus the
execute and set-userid bits
- i-nodes, and filenames separated from i-nodes, allowing hard links
- device files
Just as interesting is the fact that, out of the 33 system calls in 1st
Edition UNIX, only one has disappeared completely from modern UNIXes;
four have merged into signal(), and a few have morphed into other syscalls:
V1_RELE 0 /* release the CPU, i.e. pre-empt this process */
V1_EXIT 1 exit()
V1_FORK 2 fork()
V1_READ 3 read()
V1_WRITE 4 write()
V1_OPEN 5 open()
V1_CLOSE 6 close()
V1_WAIT 7 wait()
V1_CREAT 8 open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
V1_LINK 9 link()
V1_UNLINK 10 unlink()
V1_EXEC 11 exec()
V1_CHDIR 12 chdir()
V1_TIME 13 gettimeofday()
V1_MKDIR 14 mkdir()
V1_CHMOD 15 chmod()
V1_CHOWN 16 chown()
V1_BREAK 17 brk()
V1_STAT 18 stat()
V1_SEEK 19 lseek()
V1_TELL 20 lseek(fd, 0, SEEK_CUR);
V1_MOUNT 21 mount()
V1_UMOUNT 22 umount()
V1_SETUID 23 setuid()
V1_GETUID 24 getuid()
V1_STIME 25 settimeofday()
V1_QUIT 26 signal(SIGQUIT,...)
V1_INTR 27 signal(SIGINT,...)
V1_FSTAT 28 fstat()
V1_CEMT 29 signal(SIGEMT,...)
V1_SMDATE 30 utimes()
V1_STTY 31 fcntl(), tcsetattr()
V1_GTTY 32 fcntl(), tcgetattr()
V1_ILGINS 33 signal(SIGILL,...)
The fact that we are still using these system calls today speaks volumes
for the original design.
Cheers,
Warren
Show replies by date
A while back I wrote about the system calls in 1st Edition UNIX. I was idly
wondering how much of 1st Ed (and prior) still existed in modern UNIXes.
Obviously, with the change of language from assembly to C, we won't be able
to find identical lines, but the enumeration of system calls, for example,
is one way to spot the lineage:
1st Edition Open Solaris [1]
==============================
V1_RELE 0 indir
V1_EXIT 1 rexit
V1_FORK 2 forkall
V1_READ 3 read
V1_WRITE 4 write
V1_OPEN 5 open
V1_CLOSE 6 close
V1_WAIT 7 wait
V1_CREAT 8 creat
V1_LINK 9 link
V1_UNLINK 10 unlink
V1_EXEC 11 exec
V1_CHDIR 12 chdir
V1_TIME 13 gtime
V1_MKDIR 14 mknod
V1_CHMOD 15 chmod
V1_CHOWN 16 chown
V1_BREAK 17 brk
V1_STAT 18 stat
V1_SEEK 19 lseek32 or lseek64
V1_TELL 20 getpid
V1_MOUNT 21 mount
V1_UMOUNT 22 umount
V1_SETUID 23 setuid
V1_GETUID 24 getuid
V1_STIME 25 stime
V1_QUIT 26 pcsample
V1_INTR 27 alarm
V1_FSTAT 28 fstat
V1_CEMT 29 pause
V1_SMDATE 30 utime
V1_STTY 31 stty
V1_GTTY 32 gtty
V1_ILGINS 33 access
Quite a surprising similarity after nearly 4 decades.
Cheers,
Warren
[1]
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os…