Future Tech

Apple macOS 15 Sequoia is officially UNIX. If anyone cares...

Tan KW
Publish date: Fri, 11 Oct 2024, 10:30 PM
Tan KW
0 495,253
Future Tech

Explainer Apple's latest OS release is the newest member of the Open Group list of officially verified UNIX variants - by quite some margin.

Apple macOS 15 Sequoia appeared in mid-September and is an official, compliant version of UNIX™, but that may not mean exactly what you think. For instance, macOS does not use any AT&T source code - "Unix" stopped meaning that way back in 1993 when Novell bought UNIX from Bell Labs, as we discussed early last year when we announced that Unix is dead.

Shortly after the release of Sequoia, news surfaced regarding some security software breakages followed by the first update, version 15.0.1, earlier this month. The arrival of 15.0.1 was followed by a couple of other events. One is not very significant at all. A day or so later, The Reg FOSS desk's MacBook Air started offering the update.

The other is of a little more significance to the wider world - if only slightly. Sequoia showed up as the newest entry on the Open Group's Register of UNIX® Certified Products. In fact, it has both the number one and two spots because there are separate entries for the Apple Silicon version and the x86-64 version. There's no particular significance to the order, but if Apple continues to pay for the certification, at some point the x86-64 version will fall off the list when Apple stops supporting its Intel-powered kit.

Unix is just a newer name for POSIX

It's not about the code. It hasn't been for more than 30 years, since Novell bought the original Unix from AT&T. Really, what UNIX™ certification means now is what used to be called "POSIX compatible" - an abbreviation coined by Richard Stallman, as it happens.

POSIX is essentially a set of compatibility specifications and tests, including having the right tools present in the right locations. So long as they are there, an OS can pass the test, which is how systems such as IBM's z/OS mainframe operating system are on the list. z/OS is a distant descendant of IBM's 24-bit MVS for the System/370 mainframe from 1974, which is at heart not much more similar to Unix than an Apple II running ProDOS.

That's why a young Linus Torvalds asked the comp.os.minix newsgroup on the third of July 1991:

The POSIX standard has evolved over the years, and interestingly enough, Apple is only claiming UNIX 03 from 2002. A single product, IBM AIX 7, boasts compatibility with version 4 of the standard, branded UNIX® V7 - AKA POSIX.1-2008.

The standard has continued to evolve since then. The version 4 specification was last revised in 2018, and there's a 2024 version as well. Nobody much seems to pay attention any more, which is fair enough. The world has moved on from proprietary Unix, and now that all the significant Unix-like OSes are either FOSS or freeware, you can add any missing bits without paying.

For instance, POSIX resolved the differences between various archiving tools by adding a new command, called pax, that could handle all the main formats. It's a hybrid of tar and cpio, and most Linux distros don't include it because existing tools can handle the files. Lacking a pax command means an OS isn't compliant with POSIX-1.2001 or later, but nobody cares anymore.

So what makes an OS Unix-like?

If you don't need to use any of the original AT&T source code, and even the handful of companies who continue to pay for official Unix certification don't bother to aim at compliance with the latest versions of POSIX, then what makes an OS Unix-like?

Taking a much more high-level view, what constitutes a Unix is that it looks like Unix, it behaves like Unix, and you can port programs written for Unix to it without major modification.

The core of macOS is close enough to qualify. It uses a kernel called XNU (which, ironically, stands for "XNU is Not Unix"), and a user-land mostly derived from BSD code. XNU is based on the Mach kernel [PDF]. Specifically, after Apple bought NeXT, it updated the Mach components of the NeXTstep kernel with the enhanced version from DEC OSF/1 (later marketed as Compaq Tru64). It also has a large in-kernel "Unix server" derived from BSD code - meaning that the industry's most famous and successful microkernel OS isn't really a true microkernel at all.

On top of that, the "user-land" - the text-mode stuff underneath the GUI, the various commands, shells, and so on - is mostly open source, and much of it comes from BSD. For instance, the XNU kernel is on GitHub, as are large chunks of macOS and iOS. It's the GUI layers, the visible parts that make it look pretty, that are proprietary; those are the bits mostly written in Objective-C and more recently Swift.

Apple used to make a mostly standalone version of these lower layers of the OS available as a project called Darwin, and there were several distros that tried to complete it using bits from other FOSS OSes, such as OpenDarwin and PureDarwin. For us, one of the more interesting projects was NextBSD, which went the other way. It kept the FreeBSD kernel, but modified it so that it could use some of Apple's higher-level code, such as launchd, Apple's next-generation init system. In other words, Cupertino's equivalent of systemd.

Apple announced that it would acquire NeXT Computer at the end of 1996, and in October 1997 released a preview of its next-generation OS called Rhapsody. Rhapsody was effectively NeXTstep 5. In 1999, it became Mac OS X Server 1.0, still visibly NeXTstep-like. That evolved into Mac OS X 1.0 in 2000.

NeXTstep - the capitalization changed a few times - became OPENSTEP, which became Rhapsody, then Mac OS X Server, Mac OS X, and then just OS X with 10.8 Mountain Lion, and as of 10.12 Sierra, it was simply macOS. But it's recognizably the same OS as NeXTstep 0.8, as demonstrated by a young Steve Jobs in 1988. ®

Bootnote: So, all in C?

No, it doesn't even have to be implemented in C. Serenity OS is implemented in C++, and Redox OS is written in Rust, and both are very Unix-like. To go to extremes, both C++ and Rust are curly bracket languages in the wider C family, but TUNIS, the Toronto University System, was a Unix Seventh Edition-compatible OS implemented in Concurrent Euclid, a variant of Pascal.

 

https://www.theregister.com//2024/10/11/macos_15_is_unix/

Discussions
Be the first to like this. Showing 0 of 0 comments

Post a Comment