Standards and Specifications
Before UNIX, most operating systems were proprietary and designed specifically for a corresponding proprietary computer architecture. There were few, if any, standards, and even implementations of general purpose programming languages differed between systems, making code totally non-portable. Even basic aspects such as the size of a byte varied greatly on early computer architectures. Unix greatly alleviated many of these issues by providing a reasonably portable environment, but as derivatives proliferated so too did incompatibilities between the different branches of the Unix family tree that came about.
As technology matured and adopted explicit and de facto standards like the 8-bit byte, so too did the field of operating systems. Over time, organizations like the X/Open, IEEE, ISO, and so on have contributed to standardizing and specifying many of the software technologies that we take for granted today, such as the protocols that make the internet possible. One of the most important standardization efforts came to fruition towards the end of the last century, with the publication of POSIX.
POSIX
POSIX (Portable Operating System Interface) is a set of standards that define a standard interface between operating systems and applications. The goal of POSIX is to promote compatibility between different operating systems and to make it easier for software developers to write applications that can run on different platforms.
POSIX standards cover a wide range of areas, including file system access, process management, interprocess communication, signal handling, and more. POSIX-compliant operating systems include Linux, macOS, and many flavors of Unix and Unix-like operating systems. POSIX is maintained by the Austin Group, which is a joint working group between IEEE, ISO/IEC JTC1/SC22/WG15 and The Open Group. The POSIX trademark is owned by IEEE.
POSIX is broken down into four volumes,
XBD–Base Definitions
XSH–System Interfaces
XCU–Shell & Utilities
XRAT–Rationale
The Base Definitions section includes several higher level concepts such as the file system structure, file permissions, basic properties of processes, localization specification, and so on. Additionally, the Base Definitions section includes a specification of every C header file required by POSIX, effectively defining the interface of a POSIX operating system. The System Interfaces section includes a specification of every function declared in a POSIX C header file from the previous section. The Shell & Utilities section includes a specification of each of the 160 utilities required by a POSIX system, and also includes a specification of the shell command language. Finally, the Rational section explains the reasoning behind a variety of design decisions, as well as the authors’ plain-English interpretations of more technical aspects of the standards.
In this class, we will reference the 2008 version of the POSIX standards, which are available for free online.
SuS
Another standard, the SuS (Single UNIX Specification) is maintained separately by The Open Group. SuS is technically identical to POSIX, but enforces stricter requirements for compliance, and includes additional Networking Services (a.k.a X/Open Transport Interface) and X/Open Curses volumes, which add a socket architecture and internationalization support and terminal control features to the base specification.
X/Open was an organization that merged with The Open Group in 1996, and many of its specifications were incorporated into the SuS standard. The Open Group is the current holder of the UNIX trademark, and operating systems must be verified as SuS compliant in order to legally call themselves, UNIX™. While many operating systems comply with SuS, only a few actually have been formally registered, the most familiar of which is probably the macOS operating system.
More information about SuS can be found at the UNIX website.