50 comments

[ 3.7 ms ] story [ 111 ms ] thread
I had no idea there was a unix-like available at relatively reasonable cost before Linux. How is the c compiler, is there any way to compile some modern software for this?
There was also Minix. I used to have a binder with the source code, eons ago.

I don't know about the current state of Coherent support, but the Wikipedia page has some resource links.

https://en.wikipedia.org/wiki/Coherent_%28operating_system%2...

I ordered a magtape of MINIX from the back of the AST book, but never got it running even after going through getting a tape reader. Was highly dissapointing as I saved up my allownace as a 15 year old to buy the tape.
Coherent was published by Mark-Williams, who also had their own C compiler (MWC), which was also available for CP/M86 and the Atari ST. It's a K&R compiler, so expect some trouble with compiling modern code (unprotoize might help a bit here).

The final releases of Coherent (4.2 is the last one IIRC) also fully supported the iBCS COFF binary standard, so binaries compiled for e.g. SCO Unix might work.

You could also try to build an old gcc version with the provided K&R compiler: https://www.autometer.de/unix4fun/coherent/coh_prog.html

Copies of BSD have been traded at various prices since the 70s ranging from "free, but bring your own tapes" at user groups to a few hundred bucks (about a couple thousand dollars today) for a packaged distribution with documentation. However BSD was tangled up in a lawsuit from 1991-1994, right as Linux was launched online as a free download.
You'd likely find the experience pretty miserable, not so much because of the C compiler - Steve did a great job with that - but actually because of the filesystem. Coherent was around for a long time, remember; it used a very classic V6 UNIX filesystem, complete with odd endianness of 32-bit fields in the inode and most significantly, the classic 14-character file name length.

That right there will be an even bigger showstopper for the build scripts of most things than anything else. During the early 90's we could run GCC and Comeau C++ and all that kind of thing on Coherent fine because those codebases were still built for wide portability even though things like BSD FFS had opened that up - there were still plenty of machines running System III and System V code that most people took care not to create gratuitous collisions if truncation happened. Even shortly post the advent of Linux, that had changed dramatically and basically turned on its head and the effort involved in backporting to any flavour of classic UNIX (not just Coherent) quickly became almost impossible.

Coherent had a K&R C compiler, so modern software would simply not compile. There is a tool called "unproto" that compiles ANSI (C89) programs with K&R compilers, and there is a Coherent version on my homepage (http://localhost/t3x.org/index.html#retro -- scoll down a bit). However, even this will probably not get you ver far with modern software.

For 32-bit Coherent (4.0.0 and later) there is some 2.x GCC, but I have never used it and I doubt that it can compile software that is "modern" these days.

> I had no idea there was a unix-like available at relatively reasonable cost before Linux.

That is why I posted the link.

Linux was not the first low-cost Unix for the PC.

Very roughly, it went:

* Unix only ran on proprietary kit. PCs were too small.

* The 286 came along, and SCO took over Microsoft Xenix and offered it as a 286 OS -- expensive, and stuff we take for granted now, like networking, X11, and a compiler, were all separate expensive extras.

* The 386 made Xenix a very credible usable OS, but it cost 10x as much as DOS or Windows. Commercial deployments in business, with no GUI, no networking, no compile, just statically-linked proprietary apps and dumb RS-232 terminals, mostly from Wyse.

* As PCs got more powerful, other companies offered expensive PC Unixes too, and SCO officially licensed the AT&T kernel: SCO Xenix became SCO Unix.

* Coherent came along with a very cheap and complete (but very limited) Unix-like OS.

* Minix came along, even cheaper and you could get the source code.

* It became possible to build and run BSD on PCs if you were a serious guru.

* GNU considered the BSD kernel and decided against it, going for Mach and the HURD instead. (Oops.)

* Linux came along and undercut Coherent, putting the MWC out of business.

* NetBSD and FreeBSD became somewhat usable if you were highly capable.

* Linux gradually became somewhat usable as a mainstream OS, with things like live CDs (Yggdrasil, Lasermoon Linux-FT) and installable modular distros with packaging (Red Hat Linux, Debian).

(comment deleted)
Huh, what a blast from the past. About 30 years ago, in Russia, I hacked up cyrillics keyboard support for Coherent by extending the line discipline layer in its kernel. It was probably still Coherent 3.0 though (which IIRC was based on Unix V6?), and the one on github seems to be 4.2.x.
It's not based on V6, although it was basically created as a clone of it (and on the PDP-11, no less - the x86 versions of Coherent until 4.x were basically just minimal ports that kept the PDP-11's classic 16-bit flavour). It was a very very good clone, enough that a lawsuit was threatened and Dennis Ritchie himself got pulled into checking that it wasn't derived from any UNIX source - see dmr's comment at https://groups.google.com/g/alt.folklore.computers/c/_ZaYeY4...
Cool! I had my hands on it, too. For some reason it got traction in late USSR.
I don't understand why someone would throw tarballs of source code into a git repository.

https://github.com/a-mail-group/coherent

Probably because somebody had the tarballs lying around, somebody else said "dude, that's so cool, you need to put them on github", and the first person grudgingly obliged. Seems reasonable to me to defer the labor of unpacking and organizing everything to the person who thinks it's really cool, instead of the person who regrets not cleaning out their desk sooner.
Fun fact - The Mark Williams Company[1], who made Coherent, was founded by Aaron Schwartz father, Robert Schwartz [2].

A couple of friends and I drooled over an AT&T Unix manual that our public library had in 1990 - 1991. Unix seemed really cool but we could never afford a real Unix machine. We talked about pooling our money and buying a copy of Coherent but we never did. Then Linux came on the scene and Coherent was forgotten.

[1] https://en.wikipedia.org/wiki/Mark_Williams_Company

[2] https://en.wikipedia.org/wiki/Aaron_Swartz

I didn't know the company was founded by Robert Swartz. I'd always see the magazine ads for Mark Williams C, and just ssumed that it was written by a programmer named Mark Williams who made a company.
Another fun fact: One of the Coherent's authors was Tom Duff (of Duff's Device fame) apparently.
Yes, and also notably Dave Conroy of MicroEMACS fame. I do believe that as with QNX and MKS Systems and Watcom, Coherent was mostly built by former graduates of Waterloo university - their computing department is responsible for a great many notable products.
I went to a technical highschool with focus on informatic, so for our operating systems class the introduction to UNIX was done via Xenix.

It was a PC tower, that the teacher would rent from his work once a week.

Given the timeframe, we would split in groups, having prepared our samples as best as we could in Turbo C for MS-DOS, with dummy implementations for the UNIX calls not available on MS-DOS.

Then we would take 15m turns, to try to make our applications run in Xenix with the actual real implementations, instead of the stubs.

Current generations have no idea how expensive it was to get into computers.

Definitely true. And as well, the level of innovation that brought, particularly in places like Australia/NZ or the (then) East Germany/Ukraine, the outrageous cost of components made for a whole generation of quite exceptional "frugal" engineers. UNIX itself was - despite being in the US - born out of a similar level of necessity.

One thing about Coherent (and why I periodically fiddle about with implementing replacement, modernized kernel designs for it, albeit not in C) is that exactly like V6 UNIX it is an exercise in that kind of design, but being for the x86 and partially modernised to an early-90's level it's considerably more accessible than V6 to anyone who wants to look at the source code today to learn about that.

That sounds incredible tedious, but probably a lot of fun too. The best my high school had was Apple IIe's, BASIC, and a couple Mac LC's. I wish I'd had a more experienced mentor in those days. It took me a much longer time to cobble together basic comp-sci knowledge fiddling around on my own.

I ended up getting access to XENIX, too. It was thru a public access system but it was a long distance phone call. That put a damper on too much experimentation. They also didn't have a C compiler (or, if they did, I couldn't figure out how to use it).

This was at the technical level, during the last three high school levels (10 - 12), where one is expected to finalize with an internship in a company instead of going straight into the university.

Job related stuff is intermixed with traditional highschool content.

However that does not prevent applying to the university later on, many people go through this route in European countries where it is available, just in case.

Someone linked this article.

I am curious to the attraction of Coherent now. Anyone that used it or wrote code for it hated it. It was not compatible with any version of Unix. SRV(3,4) was what the world lived in back in the 80s/90s. It would not boot on certain machines because of issues with hard drives. We had 68k machines that used SMD drives, then later on PC it would not work with different ESDI drives. The network stack would get hung up, requiring a reboot. Even the C library w/ the C compiler it came w/ was not standard. I could go on forever.

I read this article:

https://itsfoss.com/coherent-operating-system/

It claimed, "It was an excellent UNIX option at the time..."

People are not remembering correctly. Companies would have port teams and none of them wanted to deal w/ Coherent.

> Anyone that used it or wrote code for it hated it.

I didn't! Used Coherent 3.0.0 and all later versions and wrote quite a few programs for it and ported many more. UUCP packages, news readers, wrote my own CU clone, my own mail client, etc. It was a real Unix system for $99 and fit easily on a 20MB ST-225 hard disk with plenty of space for your own stuff. I loved Coherent.

Maybe in commercial software development things look different, but for me as a hobbyist it was a dream coming true.

I still remember the documentation that came with Coherent 4.x. It was amazing!
Hey Nils, love your work - back around '90 when I joined Mark Williams I was a big Scheme fan, so your whole t3x.org site and "Scheme 9 from Empty Space" particularly puts a smile on my dial.

I do think the fact that Coherent really hewed 100% to the original V6 approach based on the basic design constraints of bootstrapped minimalism was part of the charm. Doing the 4.0 release process I really pushed myself hard to get as much POSIX compatibility in as humanly possible, but the balancing act was the size-coding part - making /bin/sh still be 16-bit while having $(()) and shell functions and able to process those insane MB-sized GNU autoconf scripts that embedded >64kb here documents, etc. Another big part of why the size-coding style mattered was keeping the system comprehensible since with only a few developers everyone was spread so thin, but that's again part of the fascination.

I've always wanted to give Coherent a bit of a conceptual reboot for modern x86 (particularly multicore, which means a complete new kernel) but staying to the 16/32-bit size and with a style similar to your books walking through the process of making it and how all the design choices need to interlock to make that possible is something I wish I had the free time for.

Thanks, and always good to hear stories from Mark Williams! The minimalism of Coherent 3.x indeed gave it a special place in my heart. I still have a virtual machine image of it, now even with the complete source code.

A book about the internal workings of Coherent would really be cool! Why would you even need to create a new kernel? Just describe what is there. I think it would be a very interesting book (even though the audience might not be very big). Maybe you will have the time to write it some day.

The big thing I think with any book is to aim to inspire people (especially younger ones) to create for themselves, and while there's probably a way to do that with an exegesis of the existing source I don't know what it would be. The approach you take in your books is one that I think is inspiring to people to get them trying these things on their own - which is after all where the real hard learning happens.

That's particularly true because so many point design decisions made in commercial codebases like Coherent were conditional on a wider context - both technological and business - that just doesn't exist any more, and that I think gets in the way of helping younger people reaching a deeper understanding and appreciation of the design decisions made.

Recontextualising that code, and re-examining those decisions in the light of the modern day is just more interesting to me, and as well provides the chance to lead people through the process of solving the design problems in a way that's narratively easier to follow. Bootstrapping forces an order on what you do that gives a particular structure to the presentation, while at the same time we have aspirations about what future elements we want to achieve that shape and give context to all kinds of decisions as we work out how to get there.

After showing how to build something today, we can do a compare-and-contrast against the existing Coherent code that's more meaningful, especially because we can then measure the outcomes. Anyone can do (and lots of people do) ill-informed hand-wavy postulations about what-ifs, but the process of actually building things that do work forces your hand in ways that armchair enthusiasts miss.

[Submitter here]

> I am curious to the attraction of Coherent now.

TBH I am not sure that it has one.

> Anyone that used it or wrote code for it hated it.

{{citation needed}}

I knew a few owners. They loved it. Until Linux, Coherent was the cheapest way to get a UNIX OS on a PC.

> It was not compatible with any version of Unix.

That is not fair or reasonable or accurate for the time.

This was a 1980s product. No 1980s Unix was compatible with any other. That's why the iBCS existed:

https://en.wikipedia.org/wiki/Intel_Binary_Compatibility_Sta...

They were all different, even though all were based on some version of the same AT&T kernel or code derived from it.

Coherent was so close and so compatible that AT&T believed it must have been based on stolen code and sent Dennis Ritchie himself to visit the company and check.

Here are his comments from that visit:

https://groups.google.com/g/alt.folklore.computers/c/_ZaYeY4...

«

An anecdote: sometime fairly early after the Mark Williams company started offering their Coherent system (a Unix clone), some AT&T legal people asked me to visit Mark Williams for purposes of determining whether what they were offering was a rip-off (i.e. essentially a copy) of the currently licensed Unix done by us. I find it hard to reconstruct the date this happened, but it was a long time ago; probably early 1980s. I went to Chicago with Otis Wilson, who was then involved in Unix licensing.

It was a rather strange experience. The Mark Williams company was a paint producer, and I was given to understand that the subsidiary that was doing Coherent was, approximately, a corporation arranged by a father who, approaching retirement, had more or less shut down the older business and was using the corporate name and legal setup to help his son in a new venture.

Otis and I visited the offices of Mark Williams on the outskirts of Chicago and were received with courtesy and some deference. We talked to the father and the son (Bob Swartz, i.e. the guy behind Coherent). There had been communication before, and from their point of view we were like the IRS auditors coming in. From my point of view, I felt the same, except that playing that role was a new, and not particularly welcome, experience. The locale of the company was in an industrial section and it definitely retained the flavor of a the offices of a paint company being recycled.

What I actually did was to play around with Coherent and look for peculiarities, bugs, etc. that I knew about in the Unix distributions of the time. Whatever legal stuff had been talked about in the letters between MWC and AT&T didn't allow us to look at their source. I'd made some notes about things to look for.

I concluded two things:

First, that it was very hard to believe that Coherent and its basic applications were not created without considerable study of the OS code and details of its applications.

Second, that looking at various corners convinced me that I couldn't find anything that was copied. It might have been that some parts were written with our source nearby, but at least the effort had been made to rewrite. If it came to it, I could never honestly testify that my opinion was that what they generated was irreproducible from the manual.

I wrote up a detailed description of this. I can't find it, probably because at the time I was advised that it was privileged lawyer/client material. Partly at the time, partly thereafter, I learned that a variety of Unix enthusiasts (several from U. Toronto) had spent time there.

In the event, "we" (=AT&T) backed off, possibly after other thinking and investigation that...

You sound like you were a hobbyist.

> {{citation needed}}

We didn't take surveys back then. It's success is enough of a citation.

> That is not fair or reasonable or accurate for the time.

Yes, it absolutely is. It claimed to be a UNIX clone. Having Borne shell and UUCP doesn't make it UNIX. Stallman was responsible quite a bit of the standards for UNIX. Coherent did its own thing.

Coherent didn't have STREAMS, how could it be UNIX w/o STREAM? How about symbolic links? What? No links? What about TLI? What no TLI? How about any functioning IPC mechanism. 16 character file name max? Common. You have no idea what you're talking about. You ran a BBS.

> This was a 1980s product. No 1980s Unix was compatible with any other. That's why the iBCS existed:

This is not true. See Stallman's work on the IEEE committee. The push for standardization began in the early 1980s. Again, you don't know what you're talking about. You link the ABI, yet, that had nothing to do with the standardization.

Coherent was release in the early 1980s. Everything you discussed came well after UNIX started losing market share to Linux.

It's pointless to discuss this w/ someone like you.

The fact that someone disagrees with you does not mean that they are stupid or wrong.

> You sound like you were a hobbyist.

Professionally deploying, maintaining and supporting SCO Xenix in 1989 and working with Unix ever since.

Have worked with and supported SCO Xenix, SCO Unixm, IBM AIX, Sun Solaris, FreeBSD, OpenBSD, NetBSD, DragonflyBSD, and of course Linux since Slackware 2 or so.

Currently the Linux and FOSS reporter for a major UK/US IT news website.

Unlike you, I'm using my real name. Look me up. Nothing to hide here.

So, I'd say no to that.

> We didn't take surveys back then.

Some certainly did.

> It's success is enough of a citation.

1. That should be "its".

2. It was a large commercial success, as evinced by AT&T sending the co-creator of UNIX itself to verify that it was clean code.

I call utter BS on both.

> Stallman was responsible quite a bit of the standards for UNIX. Coherent did its own thing.

Yeah it did, but that's neglecting the real history and unfairly distorting the picture. You are attempting to misrepresent history.

IEEE Standard 1003.1-1988, known for short as "POSIX", was published in 1988. It's there in the name.

Coherent had been out for eight years by then. The effort only started in 1984:

https://sites.google.com/site/jimisaak/posix-impact

Coherent was already on release 2.4 by the time the POSIX standardisation effort started:

https://books.google.im/books?id=amQldGdl9LkC&pg=RA1-PA250&r...

It is not possible to comply with a standard that does not exist yet.

Coherent 3.0 was released in 1990:

https://www.autometer.de/unix4fun/coherent/

That is a year before Linux 0.01, 2 years before 386BSD, and three years before FreeBSD and NetBSD.

It was different to Unix because the company went to some lengths to prove that it wasn't a Unix. The standards compliance you demand did not exist yet.

These claims and demands are unreasonable, unfair, and misleading.

As the previous link says:

«

In 1994 Mark Williams released COHERENT 4.2, with STREAMS, POSIX.1 and POSIX.2 compatibility

»

Once these standards were real and out there, Coherent complied.

> It's pointless to discuss this w/ someone like you.

It's not pointless: your flailing and your ad hominem attacks, followed by your failure, can always serve as an example of what not to do. :-)

You just had to have been there. Sure Interactive made a better Unix than Coherent, but it required a 386. MINIX wasn't out quite yet. Apple's Unix required an expensive Mac. 68k based workstations were expensive. I ran Coherent on a 286 I inherited.

In this era people were accustomed to platforms offering slightly different Dev tools and capabilities. When you wanted an apple ii program to run on a c64, you had to PORT it. There was no java. There was no gcc. The STL was neither S, nor exclusively T or L. C compilers were often proprietary, written by companies making hardware. And had different takes on the language. The reason that C89 is called C89 is the standard was ratified in 1989, almost a decade after coherent was first released.

In '89, paying $500 for Interactive/386 made sense. But in '85, you couldn't do that, so $100 for coherent on a 286 or even 8086 was a decent alternative.

For someone who didn't earn much it was a godsend. It looked and felt enough like real UNIX that I was happy to buy it for home use.

However work was all Xenix/UNIX/AIX/Ultrix/etc.

I ran Coherent 4.x on a 386sx before I got into Linux. This was probably 1992 or 93.
You were fortunate to have one of the few computers it would actually run on.
I didn't think its hardware requirements were that exotic? This was a fairly generic PC clone laptop. I knew another guy who ran 3.x on a 286.
> This was a fairly generic PC clone laptop.

What year?

It would've been either late 1992 or early 1993. It was a rather low end 386SX/20 laptop.
I ran Coherent on quite a few PC clone computers, most of them 286 with a WD1006 MFM controller and a Seagate ST-225 or Mitsubishi MR535 hard disk. Later I had it on a variety of cheap 386 boxes with IDE interfaces and on one machine with an Adaptec 1542 SCSI adapter. It never caused any issues on any of them. It was in the late 1980's to early 90's. If it was luck, I must have had a lot of it back then!
I used Coherent for a while and only moved to Slackware went it folded in 1995. Started with the 286 version and went to the 386 version when it came out. It was very nice and had some unique items. The 386 version was also able to run coff binaries from SCO.

The docs that came with Coherent was very good, as good as what comes with OpenBSD. I remember in comp.os.coherent, starting around 93/94, Linux people started trolling the group.

You can get images from here, it is able to run in a VM:

https://www.autometer.de/unix4fun/coherent/

FWIW, if Coherent did no fold, I would have stuck with it.
Coherent was interesting because it emerged as an interesting answer for getting true multitasking, multi-user performance out of 386 machines that wasn't priced ridiculously high. Coherent's tool chain wasn't as good as SCO's and that meant a lot of work for porting. There wasn't a lot of software ported to it (i.e. databases, etc...) so you were pretty much writing the whole application on Coherent. If you were writing a greenfield application, coherent wasn't bad and was priced really nicely (at the time).

Incidentally, the problem with Unix at the time was the crazy license costs for SCO and Xenix. The lower cost alternatives were weird "multiplexed dos" operating systems like Concurrent DOS and the multiuser version of DR DOS.

I remember Coherent, it had a snail/nautilus logo, and came in a binder with a bunch of floppies. I bought it as I had a PC with a 286 (or maybe 386, but no separate FPU), 1MB of RAM (luxury, right?) and needed to get more familiar with unix, since we were using Sun x-terminals in college, and time on those was limited. Taught me to cpio/tar, gcc, vi make files etc.

For the princely sum of $99, I think? My 9600 baud modem cost $500 at the time.

- all pricing could be off by an order of magnitude, but I think I'm pretty close (!).

Yep, I recall it being $99, but I thought mine came with a perfect-bind paperback book, probably with a nautilus shell on the cover. I bought it, but there was some showstopper for my needs, maybe that it only supported 64KB processes(?), so I returned it.

Today, our pocketbooks are spoiled by open source, few-dollar phone apps, and you're-the-product SaaSes. $99 (in decades-ago dollars) was often a bargain price for a lot of nontrivial PC software. That was also the price of Borland Sprint (cheaper than Wordperfect), and Borland Turbo Assembler&Debugger 1.0 bundle (Microsoft's assembler costs hundreds), both of which I bought while grossing $3.65/hr. As a teen, I briefly sold a simple program-launching menu program for MS-DOS for $24.95 (and about broke even, after packaging costs).

Yes, prior to 4.x processes were strictly limited to 64kb code and 64kb data - essentially the equivalent to what MS-DOS programmers would call the small memory model only. There are a bunch of reasons for this, all of which stem from the fact every part of Mark Williams C and the assembler/linker toolchain hewed so closely to the exact model set by V6 UNIX - including the same .o and .a formats, hence the same limitations all down the line.

Since so much my previous work before joining work on Coherent was on embedded toolchains and DOS development, the fact that so little use anywhere was made of x86 segmentation was surprising to me, but I knew all the V6 internals well enough to adapt back.

Even in 4.0 where the COFF and the iBCS2 syscalls all worked, actually most of the userland still stayed as 16-bit small model since the aim was to keep most of the installation process the same, which was that essentially the first install floppy was a reasonably full live system. Obviously things grew a ton and during the evolution of 4.0 we slowly had to move the bulk of the 32-bit userland components off to packages in later floppies.

I learned the UNIX shell and C programming in Coherent. Its high quality manual was legendary - nothing comes close to it today. It's amazing that this OS and documentation could have been done with such limited resources. So much value for $99. The Coherent book is still on my bookshelf and I crack it open from time to time and smile. Good memories.
The classic "Nautilus" manual was really interesting on two sides; one was the quality of the writing, which was all down to Fred Butzen - he just had a real knack for clarity and working with him on documenting the work I did during the 4.0 process was really enjoyable. Basically the process was that developers would write up drafts of everything to give to him, and he'd then edit them for clarity before passing them back for an iteration to ensure that none of the accuracy was lost. He just had an excellent sense of when there was going to be a better explanation than the classic dry manpage style.

The other notable thing about that manual was just the economics of getting a perfect-bound book of that sheer size printed and included in the USD99 price tag.

The documentation was incredible! I ran Coherent when I was in high school and that's how I learned "Unix" and C programming, before moving to Linux.