[TUHS] 1st Edition UNIX syscalls

Warren Toomey wkt at tuhs.org
Sun May 18 17:58:20 AEST 2008

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.


More information about the TUHS mailing list