This originally appeared in SunWorld Magazine (now Advanced Systems) as "A/UX and MachTEN: Serious Unix for Macs," SunWorld, July, 1993, pp. 53--58. The editor was Dave Taylor.

Unix on a Mac? Really?

by Joel Snyder for SunWorld (editor: Dave Taylor)

People don't think of the Macintosh as a Unix platform. Say "Unix," and most people will answer "Sun," "DEC," "SGI," or "HP." Not "Mac." But why not? It's just a computer. If an MS-DOS box can see the light, why not a Macintosh? That's the question we asked ourselves when we looked at two different Unix implementations on the Mac.

Apple Computer and Tenon Intersystems took two different approaches in putting Unix on the Macintosh. Both aim to maintain compatibility with existing Mac applications, but Apple's A/UX replaces the standard Macintosh operating system and provides a compatibility layer to let native Mac applications work. Tenon's MachTen takes the alternative approach, running a whole Unix virtual machine as a single task under MacOS. Neither approach is perfect, but both accomplish the same thing: a fully functional Unix, on a Macintosh.

A/UX

A/UX is a complete replacement for MacOS. When you install A/UX, it formats the hard disk into a set of Unix partitions and one small Macintosh partition. From there, the Macintosh always boots up in the standard MacOS. The user double-clicks on "A/UX Startup," and A/UX takes over, effectively rebooting the Macintosh into Unix. After about a minute, a login screen appears, and the system has become a Unix workstation. To go back to MacOS requires a complete reboot.

A/UX has three main user interfaces. When logging in, you choose either the familiar Mac Finder, an X11 window manager, or a tty-like console. The Finder interface looks like a Macintosh: double click an icon and you're running the application. Unix is hiding: there's a disk with a label "/" on the desktop. Click on that, click on the "bin" folder, and click on the "ls" icon and up pops a window with lots of little buttons and boxes, each corresponding to an ls option. When you're finished with setting options, you confirm the box, and A/UX brings up a terminal window (called a Command Shell), and does the ls, leaving you in the window. If you want to just get directly to a terminal window, you can open up a Command Shell or two from the Apple menu; it's there as a desk accessory.

The window that comes up when you click on a Unix command is brought to you by a slick program called Commando. Commando is an instant refresher course in each command's options. Can't remember how to list a cpio archive? Type cpio in a Command Shell and press Command-K, and up pops instant help. A very helpful addition to Unix for Mac users.

An alternative interface is standard X11, which is fully supported, as is Apple's MacX product. You can also hook up a terminal or log in through a terminal server: A/UX supports up to 16 simultaneous users, with a 32 user version available as well.

A/UX is a full System V R2V2 implementation, POSIX compliant, with Berkeley extensions. This means it has everything you'd expect from a good Unix: man pages, TCP/IP (with streams and Berkeley r-utilities), NFS client and server, NIS, X and Motif, cc, f77, SCCS, C, Bourne, and Korn shells, and even Adobe's TranScript for Postscript printer support. Plus, you can run most Macintosh applications, except for those which require direct hardware control.

MachTen

Tenon's MachTen takes an entirely different approach, appearing as a regular Mac application with Mac files, on a Mac disk -- no partitioning or new layout for your hard disk required. To start MachTen, you click on the MachTen icon, and it launches Unix as an application. At any time, you can move back to the Finder and launch Macintosh applications too.

MachTen appears to MacOS as a single application, but inside Tenon provides a real Unix implementation. Version 2.1 of MachTen also includes Unix-style virtual memory. In our initial MachTen testing, we started up MachTen and then immediately started X terminals displaying on nearby Sun and VAX workstations.

MachTen's standard user interface is a command shell. Based on Carnegie-Mellon's Mach microkernel version of UNIX, and using the Berkeley 4.3BSD-Reno code as a base, MachTen lacks some of the features of A/UX but does have most of what you'd need to build a respectable system: TCP/IP networking, X and Motif, NFS client and server, and the GNU C compiler. MachTen omits the standard C or f77 compilers, and some less critical programs (see table one). MachTen takes up about 30 MBytes of disk space, without the X window system server.

MachTen's manuals (20 pounds, compared A/UX's back-breaking 60 pounds) follow the traditional Berkeley style: a few short tutorials, some version-specific information, and standard man pages. Tenon also includes ManTen, a Hypercard stack containing all the manual pages, which we found helpful.

Although MachTen runs as a standard Mac app, there is a conflict between the Unix and Mac treatment of the TCP/IP protocol stack. You can't have two TCP/IP protocol stacks on the same Macintosh, so MachTen replaces the MacTCP driver and then provides a daemon which emulates MacTCP for other Macintosh applications. This means that MachTen must be started before any other network application.

Tenon also hasn't figured out how to shut down MachTen without taking the rest of the Macintosh down with it. This means that once MachTen is started, you can't make it go away without a total Macintosh reboot, somewhat fracturing the image of it as just another Mac application.

Comparing Apples and Oranges

A/UX and MachTen really aren't comparable products. They do much the same thing: run Unix on the Macintosh, but depending on your needs, it will be obvious which one to use. Overall, we found both products to be reasonably solid. We ran A/UX and MachTen for about two months, and didn't have any unexplainable crashes. Every time our Macintoshes locked up, it was because we were trying to use an incompatible Mac application, typically a communications application.

Installing and configuring Unix is never a pleasant experience. Because A/UX comes on a CD-ROM, it was easy to install: just stick the CD in the drive, answer a few questions, and go away for an afternoon. MachTen isn't yet available on CD, so we had to plow through 14 high-density floppies, then log on and let it finish the installation itself. Another afternoon.

Configuring Unix was easier on MachTen than A/UX. MachTen has a simple fill-in-the-blanks application to get everything up and running quickly. A/UX does some of that for you during the installation phase, but things like domain name service and electronic mail configuration had to be done by hand. Fortunately, the A/UX team realized that no one was going to read through twenty manuals to install A/UX, and distilled the important parts down to two "essentials" manuals.

But does it run?

Compatibility with Mac applications was very good in both cases. We tested all of the most popular Macintosh applications from Microsoft, Claris, and Adobe, and everything worked just fine. What won't work are applications that patch the operating system - mostly older INITS and CDEVs.

But what about Unix compatibility? We used several standard performance benchmarks, and both systems compiled and executed both C code and some moderately complex shell scripts without a hitch. Support is very good with both A/UX and MachTen, and both Apple and Tenon maintain anonymous FTP sites on the Internet which include patches and bug fixes.

Hardware compatibility is another story. A/UX runs on the bare hardware. That means that it won't work on a new CPU unless Apple has added support for that CPU. The same problem comes up with other peripheral devices: Ethernet cards, CD-ROMs, scanners, and tape drives. As of this writing, A/UX runs on most of the older models of the Mac II family and all Quadras but the new 800. Apple promises that V3.0.1 of A/UX will be available by the time you read this review with support for their newer 68040-based CPUs. Some third party products also have vendor- or customer-written drivers available for A/UX: you'll want to check before you buy.

Because MachTen runs under MacOS, it will work on any Macintosh with enough memory and hard disk - even a PowerBook. Virtual memory, new in MachTen 2.1, works on the 68020 and 68030-based Macintoshes, but not on the 68040-based systems. Tenon plans a release of MachTen later this year to remedy this problem.

Faster than what?

Unix isn't known for its compact size, and both MachTen and A/UX are testaments to that. A single-user A/UX system with less than 16 Mbytes of memory would be uncomfortably slow. MachTen can live in slightly less; you could be comfortable on an 8 MByte system.

Replacing the OS, A/UX is much faster than MachTen. We ran a series of benchmarks to test processor performance, I/O, and video, and A/UX came out about 35% faster on most all tests --- including processor performance. All tests were compiled without optimization, but one independent variable we chose not to eliminate was the choice of C compiler: A/UX has a standard Unix compiler, while MachTen includes GNU's. (Table two summarizes our results).

A/UX has a dedicated X11 R4 server with excellent performance as an X station --- about six times the speed of a Sun 3/50. Table two gives an idea of how fast each performs. The down side of using pure X11 is that you can't easily use Macintosh applications --- you'd have to log off, and log back on using Finder to run a Mac app. A/UX also includes Apple's MacX 1.1.7, which doesn't perform as well, but does run under the Finder, giving access to both X and Mac apps at the same time.

Tenon's X software package includes client, server, and Motif licenses. They include White Pine's Exodus X server, which runs as a Macintosh application, and demonstrated very slow X performance. Tenon plans to extend its X offerings to include a high-speed dedicated X server, which should increase performance substantially.

The Bottom Line

Don't buy A/UX or MachTen expecting to get much off-the-shelf software. Quite a bit of freeware has been ported to both A/UX and MachTen (see listing one for a sampling) but none of the popular Unix applications have A/UX or MachTen versions. But that's not much of a problem: why buy the Unix version of Lotus 1-2-3, when the Mac version is cheaper and easier to find too?

We found A/UX and MachTen to be excellent products, filling different needs in the market. A/UX is a big Unix, with more documentation than even IBM's AIX system. It feels, and is, complete. Any single-user Unix workstation that has a shell script to add users is clearly thinking big thoughts. Some might even accuse Apple of overkill in A/UX: is the market for A/UX really large enough to justify the resources of maintaining such a complex product? Regardless, Unix users will enjoy the luxury of A/UX, a fully featured Unix that includes complete Mac compatibility, though it isn't cheap: complete license plus full documentation is $1600. We wondered if A/UX will make it into 1994 with Apple's PowerPC coming down the pike. Apple's comment: "We can't talk about that."

MachTen is a much more modest endeavor. The MachTen Personal Unix, which lacks virtual memory, lets you enjoy the horrors of manually configuring sendmail for less than $500 (although a full manual set is an additional $300) on a less expensive Macintosh than A/UX requires. MachTen is a better product for someone interested in learning about Unix. For students, hobbyists, or someone who just wants to work with Unix on their Macintosh, MachTen is an excellent solution. With MachTen Professional's additions of virtual memory, the gcc+ compiler and gdb debugger, you can even put together a reasonably good development system on a Powerbook---for a lot less than Sun's Tadpole.

Joel Snyder is a senior partner with Opus One, specializing in telecommunications and international information technology. He can be reached via the Internet at [email protected].


Test Strip

MachTen Personal Unix (v2.1): Unix for every Mac ($495)
MachTen Professional Unix (v2.1): A low-cost, workstation-class Unix for
	every Mac  ($695)
MachTen Technical Documentation ($300)
MachTen X Package ($350)
Tenon Intersystems
Tenon Intersystems
1123 Chapala Street
Santa Barbara, CA 93101
   800 6-MACH-10
+1 805 963 6983
+1 805 962 8202 [FAX]
Apple Computer
20525 Mariani Avenue
Cupertino, CA 95014
+1 408 996 1010
Platforms: SE/30, II with PMMU, IIx, IIsi with PMMU, IIcx, IIci,
IIfx, Quadra 700/900/950.  Requires 8Mb RAM, 80 Mb hard
drive, CD-ROM (installation only). 
Features	( 30 %) ****1/2
Interface	( 30 %)	****
Performance	( 20 %) ****
Documentation	( 10 %) ****
Support		( 10 %) ***


Overall:	4.0 

TABLE ONE: What's Missing from MachTen

/usr/games
Korn shell
talk
source code (A/UX too!)
streams interface
other high-level languages, such as Fortran, Ada, COBOL, Pascal
native X server
source debugger (personal version only)

TABLE TWO: Performance Comparison

                  A/UX	       MachTen
Arithmetic Test, Integer (loops per second)     2590   1483
Dhrystone 2 w/o register vars (loops per sec)	14206	14739
execl() throughput (loops per sec)		104	80
File Copy, 30 second (Kbps)			446	64
Pipe context switching	(loops per sec)		669	342
Shell scripts, 8 user (loops per minute)	3	1

Xstones, normalized to a Sun 3/50

A/UX X11 R4 server				6.5
VAXstation 4000 model 60/OpenVMS/Motif		4.6
A/UX and MacX 1.1.7				2.1
Macintosh O/S and MacX 1.1.7			2.1
MachTen with MachTen X Server			1.1
Sun 3/50					1.0

LISTING ONE: Some of the FreeWare Ported to MachTen and A/UX

A/UX:

Austin KCL 
bpf (Berkeley Packet Filter)
gated
Most gnu utilities and applications
mtools (MS DOS floppy access tools)
pine
popper
smail
talk and talkd (BSD 4.3 versions)
tcsh
X11R5
cnews
elm 
less
nethack
nn
nntp 
perl
rn
SB Prolog
smail
trn 

MachTen:

perl
smalltalk
Many gnu utilities and applications
POP, V3
bash
psroff
patch
tcsh
f2c
all of the MIT X software

(sources: Jim Jagielski, Anita Holmgren)