Jed Rothwell wrote:
> I gather the operating system for Apple computers has been rewritten > from scratch more often than Windows Only if Windows has been rewritten "from scratch" -1 times. I've been in the Apple code. It's still based on BSD. (I was going to cut out a few pieces as "exhibits" but I can't find my copy of the source just now -- haven't needed to look at it since 2007 or so and I seem to have deleted the untarred copy. Too bad, I could use it right now.) CMU-Mach was created as a set of patches to BSD and Mac OS is built on CMU-Mach, with no evidence I can see of a true "from scratch" rewrite. Now, please note: The DISPLAY MANAGER for Mac OS is something else. I'm talking about the kernel here. NextStep was new with Next Software, brand new, zero ancestry, and it may very well have been rewritten more than once since. And a *lot* of people confuse NextStep with MacOS -- I've been in some totally pointless arguments in which I was talking about the kernel, and the other party was talking NextStep, and we never did manage to connect. AFAIK, save in cases where a massive change in behavior is wanted (such as the Windows 95 -> Windows NT jump, which introduced memory protection), the only reason anybody actually rewrites the OS *truly* 'from scratch' is avoid license problems. That is, if I understand the situation correctly, how Linux came to be: In the bad old days a source license for BSD ran you about $100,000. Linux, OTOH, is free, and always has been, because it wasn't encumbered with so much as one line of BSD or ATT code. Refactor, sure, you have to refactor sometimes, but that normally involves taking the old code and shuffling it around more than it involves writing new code. Rewrite pieces, sure, pieces need to get rewritten. All the vendors have rewritten their Malloc packages in the last couple decades, or so say the tests we run. Rewrite the whole thing, from a clean page ... sure, if you want to throw a couple years down the drain to get back where you were before you started. MS might be able to afford that. Not many other companies have that luxury.

