Thursday, 11 December 2008

Real UNIX my ****!

I've heard that writers write about whatever gets caught in their filters, so usually they tend to write about things that piss them off. That must apply to blog authors, because I've got a real bee in my bonnet about this issue.

According to Wikipedia the current OS's which are licensed to use the UNIX trademark are AIX, HP-UX, IRIX, Solaris, Tru64, A/UX, Mac OS X Leopard (on Intel only), and part of z/OS.

Now, I don't know about IRIX, Tru64, A/UX and z/OS, but as I understand it AIX, HP-UX and Solaris are derived from AT&T's original UNIX source code, as IBM, Hewlett-Packard and Sun respectively licensed this from AT&T, so they include code from the original UNIX.

Now BSD was created at University of California, Berkeley, using AT&T's original UNIX source code. Later, in the early 90's, all the code that was licensed from AT&T was reimplemented. Therefore, as I understand it, BSD contains none of the original UNIX source code, and operating systems like FreeBSD and NetBSD can't call themselves UNIX for that reason.

OK, so that explains to my satisfaction why AIX, HP-UX and Solaris are real UNIX, and I assume the same applies for IRIX, Tru64, A/UX and z/OS. But OS X?

Unless I've got my wires crossed somewhere, OS X contains none of the original AT&T UNIX source code:
  • The XNU kernel consists of the Mach microkernel, which was developed as a replacement for the BSD kernel, together with userland tools taken from FreeBSD4.4. So, as I see it, no AT&T source code here.
  • The shell used in Leopard is bash. Many of the other tools used are also the GNU versions as used in GNU/Linux and GNU/Open Solaris.
  • I believe the X Window Server used is a fork of Xfree86.
So, correct me if I'm wrong by all means, but I can't see that OS X contains any of the original UNIX source code. If so, surely it's not really got any more innate right to call itself real UNIX than Linux has?

So far as I can see, UNIX certification means that it's been certified as being POSIX-compliant by the owner of the UNIX trademark. Well, that really doesn't mean that much, does it? To the best of my knowledge, this would just mean you'd pay The Open Group to certify it as being real UNIX. Is there any reason why any Linux vendor couldn't pay this fee and have their distro certified as being real UNIX? I really don't think this would be a good use of their money, but I see no good reason why this couldn't be done.

So, dear lazyweb, here are my questions:

1) What actual benefits are there to an OS being certified as real UNIX?
2) Does OS X Leopard contain any of the original UNIX source code?
3) If not, what right does it actually have to call itself real UNIX?

Seriously, I'm not trolling here, I just cannot see that Leopard has any more right to call itself real UNIX than Linux does on the basis of the source code. And if it's based on certification, then what's to stop a Linux distro vendor from having their OS certified as being real UNIX?


The Untergeek said...

One of the stipulations of gaining UNIX certification is that you can cross-compile from one UNIX certified environment to another.

If Mac OS X can do this, then it meets the requirement set forth. It behaves like UNIX and it is 100% interoperable with other UNIX systems.

Incidentally, the Open Group who now own the UNIX trademark have nothing to do with old AT&T code. UNIX is now a trademark, not a collection of source code. Also, BSD had AT&T code for quite some time. They did clean-room functionality matching with the infringing pieces so as to avoid the licensing issues.

There was a big case settled in 1994 where it was determined that BSD was in the free and clear. Basically, BSD is UNIX too, just with functionality-matched, clean-room generated code.

BSD is a closer match to UNIX than linux because it was originally in the same tree. Linux benefits from BSD's clean-room derivatives because the same thing was able to be done by GNU. The GNU tools now are far superior to the legacy ones still tied to the AT&T code, too. Just compare Sun's native tar to GNU tar to see what I mean.

The Untergeek said...

Oh, one more little tidbit. SunOS (precursor to Solaris) was BSD based. They went SysV when they made the change to Solaris. Even Sun is part of the BSD/UNIX dichotomy.

MattBD said...

I'd heard in the past that the GNU tools had surpassed the legacy ones used in commercial *nixes, to the point that even where they shipped with the original tools it was common practice to replace them with their GNU equivalents. That makes sense, the free software community has a strong reputation for producing tight, clean code.Also, both Linux and OS X use a lot of these by default, and these are arguably the two most widespread *nixes, so no doubt these are seeing more active development.
Anyway, cheers for explaining that! It makes a lot more sense now.

pbsl said...

thanks for sharing this site. you can download lots of ebook from here