Coherent: The affordable Unix-like PC OS from over a decade before Linux 0.01
github.com
github.com
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.
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 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.
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.
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.
> 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 I'd wasn't involved in.
So far as I know, after that MWC and Coherent were free to offer their system and allow it to succeed or fail in the market.
I suppose there's a second story about the suit by USL against BSDI and then UCB, but my own involvement was far tinier and didn't get me a trip to Falls Church or Berkeley to snoop. What advice I offered in this situation was exactly in line with that about MWC/Coherent, and as it turned out the resolution (though more costly for all) was pretty much the same.
(As a capper, Bob Swartz came by Bell Labs a week or so ago, and we had a pleasant social visit.)
Dennis
»
> {{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.
> 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. :-)
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.
However work was all Xenix/UNIX/AIX/Ultrix/etc.
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.
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.
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.
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).
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.
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 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:
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 (!).
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).
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.
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 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...
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
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.
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.
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).
What year?