17

I've read that the last DOS kernel based Windows was ME. Later versions use the NT kernel. Why did Microsoft rewrite the whole kernel? Why was the DOS kernel discarded?

9
  • 39
    Calling DOS a kernel is giving it way too much credit. It is most definitely not a kernel in the OS sense, more a variety of services a running program can rely on.
    – Jon Custer
    Nov 17, 2022 at 20:36
  • 24
    Windows NT, which wasn’t based on a DOS kernel, was released in 1993, long before Windows Me — in fact, before Windows 3.11! Nov 17, 2022 at 22:24
  • 14
    Why was the DOS kernel discarded? Obviously because there were no remaining references to it.
    – dave
    Nov 18, 2022 at 1:17
  • 5
    The Windows Me kernel is not based on DOS. The Windows 95 kernel was not based on DOS. Even Windows 3 did not really use DOS
    – JeremyP
    Nov 18, 2022 at 8:47
  • 7
    @JeremyP Ever read Unauthorized Windows 95? Nov 18, 2022 at 17:26

8 Answers 8

37

The DOS kernel is made to provide basic filesystem and memory management for single-tasking 16-bit systems. This still was good enough up to Windows 3.1, as Windows consolidated all the Windows tasks into one virtual task running on DOS. If we exclude the 386 Enhanced mode, DOS tasks in windows could only be run one at a time and only in full screen mode, so again only a single task was running. Making a clean switch between DOS tasks and the Windows system is difficult without knowing a lot of DOS internals (which Microsoft obviously knew, at least for MS-DOS), but works well enough. The cooperative multitasking philosophy of Windows 3.1 made it easy to make sure the multiple Windows tasks could easily interact with DOS like only one task were running.

The operating philosophy changed with the introduction of the Win32 API, which provided preemptive multitasking and 32-bit support, both of which are unfit for use with the DOS kernel. Windows 95 included "compatibility mode" passthrough drivers that sent requests to DOS and/or the BIOS when there was no 32-bit Windows 95 driver for a hardware component, but using this capability was seen as a last resort and known to provide significant performance issues.

On the other hand, the NT kernel was designed with multitasking, memory security and access control in mind, so it proved to be a good fit for a modern 32-bit operating system. The architecture of NT is designed flexible enough, that porting it to 64 bits (e.g. an experimental 64-bit Alpha version, an official Itanium version and (it used to say centuries here...) some years later to x86-64 aka x64 aka AMD64) was easy enough without breaking the established programming model.

6
  • 5
    Perhaps not so much ‘cancelled’ as never intended for public release at all: <devblogs.microsoft.com/oldnewthing/20220106-00/?p=106122> Nov 17, 2022 at 23:02
  • 1
    afair what Raymond Chen said, the Itanium version was the first 64 bit port of NT. Nov 18, 2022 at 9:18
  • 2
    It shows how fast things must have been moving at the time that less that you are using the term "centuries later" for less than 5 years. Nov 19, 2022 at 1:41
  • 1
    @PeterGreen Oops, I meant to write "decades", not "centuries", while still assuming that they started with their AXP 64-bit port early before Itanium (so more like NT3.51 times, i.e. 1995) and contrasting that to the Windows Vista Release (2006), which actually is more than 10 years. The facts are: First shipped Itanium version (XP pre-release): May 2001, Official x64 release (Server 2003): April 2003, which is not even two years. Nov 19, 2022 at 16:13
  • 1
    Did server 2003 enterprise come with x64 support from the start? the wikipedia article implies that 2003 standard didn't get it until 2005 but isn't clear about the higher editions. Nov 20, 2022 at 9:27
28

TL;DR:

DOS is not capable to deliver what any Windows after 2.0 needs. It can only handle real mode and 1 MiB of Memory. All Windows after 2.0/286 were essentially replacing/virtualizing large parts of DOS. By 9x DOS wasn't much more than a boot loader.


Maybe some points to consider

  • DOS was never a "kernel" of any OS.
  • DOS is a very basic I/O abstraction layer, not much more.
  • More important, it was only single tasking.
  • It is a hard bottle neck to anyone trying to multitask above/around.
  • Windows started out as little more than a GUI library.
  • If at all, it's Windows that brought something like an OS-Kernel, using DOS as I/O layer(hence KERNEL.DLL).

As well as the timeline

  • DOS development was supposed to end with DOS 3.2
  • MS focused after 3.2 on what now is often called 'European DOS 4.0' a DOS compatible multitasking system
  • DOS 3.3 was created solely by IBM, mostly as a maintenance release to support their new PS/2 line
  • Only aber about a year of nagging customers, who wanted to have 3.3 to be able to compete with IBM, MS rolled out a generic 3.3 (3.31 for example for Compaq)
  • 'European' DOS 4.0 was cancelled as MS and IBM agreed to build a new OS together, OS/2
  • IBM made DOS 4.0 to support larger disk sizes and new graphics cards.
  • At the same time MS and IBM ship OS/2 1.0, destined to replace DOS for all Text mode application on 286 and up.
  • OS/2 1.1 introduced a GUI which looks essentially Windows 2.0
  • MS ships Windows 3.0 which is seen as a bridg leading customers over to OS/2
  • Windows 3.0 (and even more 3.11) becomes an instant success as it does run acceptable on low end machines while keeping high DOS compatibility
  • MS decides to put their force behind the success of Windows 3.x
  • MS creates Windows NT in part based on their experience with OS/2 but with a goal of high Windows compatibility.
  • At first NT is supposed to be a network and professional OS
  • Windows 3.x takes the role as client and consumer OS
  • While Windows 3.x does work rather fine for simple application the kludged architecture was not really scaling to growing needs.
  • MS tries a lot of work around with Win32, new drivers and much more. Not really successful

Long story short: While Windows on top of DOS was a nice idea in 1990, and a great low end solution during the decade, especially due high compatibility with older software, it was simply no longer capable to deliver at the end of the decade.

8
  • 3
    Merging NT and DOS-Windows is also desirable (from Microsoft's viewpoint) to avoid duplication of software development effort.
    – dave
    Nov 17, 2022 at 23:50
  • 1
    Why didn't they add multi-tasking, a GUI library and 32bit support to DOS? Even if it was not a kernel, why was it discarded? Sorry, but my question is still not answered.
    – zomega
    Nov 18, 2022 at 17:46
  • 4
    @somega Because it would still be a deadlock. DOS can only handle a single I/O request at a time. It can neither combine, reorder or interleave I/O access. Any I/O will block the whole system, not just the task that is requesting an I/O. Likewise putting 32 bit on top just slows down the system with duplicate data transfer. Each and every I/O of DOS has to come from 16 bit I/O space. For example in case of a disk read, DOS can only read that date to the first megabyte of memory, as that's all DOS can access. ...
    – Raffzahn
    Nov 18, 2022 at 22:16
  • 3
    @somega Any 32 Bit process will of course reside above that( First Meg is reserved for the OS), so data has to be moved another time up into 32 bit memory. And all of that while blocking all other processes. Great way to make fast PC slow. It's the very reason why NT was more responsive and over all faster than Win 9x on the very same machine. Changing DOS to access more than the first MB would mean to rewrite it in all details, as all of it's API is tied to 16 bit hardware. Last but not least,DOS is a tiny piece of software just a few KiB. Any 32 bit wraper around is already bigger.
    – Raffzahn
    Nov 18, 2022 at 22:18
  • 2
    @dave_thompson_085 I think I recall, from "Showstopper" and talking with IBM employees, that at first microsoft and IBM were fully on-board for jointly developed OS/2 as the next step. The Windows screwjob only came later. "Destined" seems to capture that initial agreement nicely. Nov 19, 2022 at 2:11
24

Microsoft didn’t “rewrite” the DOS kernel, they replaced the DOS ecosystem. Windows wasn’t even their first attempt to do so!

The short answer

DOS was never a complete operating system, so it didn’t provide a comprehensive platform which could be migrated or extended as a platform, taking its hosted software and its users with it; and a lot of its success (and DOS-based Windows’ success) was accidental, and therefore didn’t provide the development lead-time necessary for planned transitions.

It ended up being replaced by Windows 2000 and XP, which descended from Windows NT. NT wasn’t designed to replace DOS; it wasn’t even designed for PCs initially! It was designed to be the best operating system that its creator, Dave Cutler, could come up with. Of Microsoft’s many attempts to produce a new operating system after DOS, it ended up being the successful one, and the various ecosystems around it either converged (Windows 3.x, Windows 9x, and NT) or saw their importance diminish so that end-users wouldn’t balk at not-quite-perfect support (DOS). G. Pascal Zachary’s Show-Stopper! covers the creation of NT in detail.

DOS services and limitations

Microsoft bought DOS to provide an operating system for IBM’s forthcoming PC (see When was QDOS changed to MS-DOS?). It was a simple operating system closely tied to the 8086/8088 CPU, and it wasn’t designed to provide a base for an evolving platform. Its APIs cover only a small amount of what many programs need, so it never provided a full operating system platform: DOS services’ include file system I/O, disk I/O, stream-based I/O, date/time, process management, and memory management; there is no support for graphics, full-screen text (even with ANSI.SYS), scheduling, any moderately sophisticated handling of parallel or serial ports, etc. Part of this is because MS-DOS was a multi-platform system, and was available for a variety of non-PC-compatible systems; but the result was that many programs ended up tied to other services on the system (provided by the BIOS), or even directly to the hardware (it was common to write directly to video buffers). DOS provides no protection between processes, or between processes and the hardware; it can’t even protect itself! In fact it provides APIs to change interrupt vectors, so it was seemingly expected for programs to be able to make deep changes to the running system.

An operating system is only as relevant as the programs that run on top of it. By the time it was obvious DOS was a success, and it might make sense to improve it to increase its future relevance, it was too late: successful programs used DOS services but also had to work around the lack of features. In particular, direct hardware access and the way memory was handled meant that it wasn’t possible to change the DOS kernel so that it could benefit from the 286’s additional capabilities (in part because the 286 was designed before lessons from the 8086 could be learned), and it would have been difficult to cater for all types of DOS programs even with the 386’s additional capabilities (V86 mode for example). Even as far as DOS’ APIs are concerned, it wouldn’t have been possible to change them to add general-purpose support for multi-tasking or multiple users. (Some did try; for example, DR DOS included multi-tasking and multi-user support, but it didn’t work with everything and was easily broken.)

So DOS ended up stuck in its ways, impossible to revamp to provide a new platform — or at least, not in an economically interesting way, compared to either creating an entirely new operating system or just layering new features on top of it. And once a successful layer emerged (Windows), its own APIs were sufficiently isolated from DOS’ that it made more sense to provide them on another system (NT) than to rewrite the DOS kernel.

Microsoft’s other early operating system: Xenix

At the time DOS was released, Microsoft already had another operating system, also bought in — Xenix, a licensed version of Unix. That was seen as the “grown up” operating system, sold on a number of platforms, including (eventually) PCs; and as DOS grew up (with version 2.0), a number of concepts were ported to it from Xenix (see What's the relationship betweeen MS-DOS and XENIX?).

History tells us that Xenix never replaced DOS, and by the end of 80s Microsoft had abandoned it (see What were the differences between Xenix and Unix?). By this time, Microsoft had embarked on two new operating systems: MS-DOS 4.0 and OS/2.

Multi-tasking MS-DOS

There was one attempt to extended MS-DOS to produce a more capable operating system. MS-DOS 4.0 (“European MS-DOS”) was a multi-tasking version of DOS, albeit not really a general-purpose one. It introduced background tasks which could continue running in parallel with a foreground task, and was marketed somewhere in between “plain” MS-DOS (for run-of-the-mill PCs) and Xenix (for workstations and servers). IBM weren’t interested in this, and it failed to gain traction.

OS/2

OS/2 was a joint effort with IBM, and supposed to be the operating system which would take the PC (or rather, from IBM’s perspective, the PS/2) into the future. It was designed as a fully multi-tasking system from the beginning. For backwards compatibility purposes it could run DOS programs, but because it targeted the Intel 80286 CPU, it could only provide limited support for them; in particular, it could only run one DOS program at a time. Most end-users in the 80s wanted to use PCs to run DOS programs, so OS/2 didn’t have a significant advantage; it was also marketed as not for PCs, and required well-equipped PCs. (This changed with OS/2 2.0 and even more so OS/2 Warp, but by then it was too late.)

Windows on DOS

In parallel with all this, Microsoft had been developing Windows, its DOS-based graphical user interface. It didn’t meet with much success initially, but it did lay all the groundwork for a complete operating system replacement in the future: it provided a complete API and rules for memory management etc., allowing programs to be developed in isolation from the hardware. Its initial versions were tied to the 8086 and 80286 platforms, but a few extremely talented engineers figured out a way to rework it so that it could take advantage of the 80386’s new features without rewriting the whole ecosystem (see What key factor led to the sudden commercial success of MS Windows with v3.0?).

The sudden success of Windows 3.0 allowed Microsoft to give up on OS/2, and they pulled out of their partnership with IBM. A couple of years before this, Microsoft had hired David Cutler to develop a new operating system (Microsoft’s fourth major operating system), to ensure Microsoft would stay relevant in the face of the emerging RISC platforms and the perceived threat of Unix. (See How much better was DEC Alpha than contemporaneous x86? and this issue of PC Magazine to get a feel for the landscape in the late 80s and early 90s.)

The success of Windows 3.x also meant that, at least for software other than games, DOS became less important as an application platform: users switched to Windows applications.

Windows NT

This fourth operating system is what became Windows NT: a brand-new, multi-platform, multi-ecosystem environment designed for longevity. It was designed to be portable and to be able to host a variety of APIs. It was marketed for servers and workstations, and was released in 1993, in between Windows 3.1 and 3.11 for the lower end of the market.

DOS becomes irrelevant

Thus in 1993, Microsoft was developing and selling two operating environments in parallel: MS-DOS with Windows 3.x, and Windows NT. Both of these had the same user interface, and for Windows applications, similar APIs (so developers used to Windows 3.x could switch to Windows NT without too much hassle); and NT on x86 could run most existing Windows 3.x software. Windows 3.x in enhanced (386) mode was arguably an operating environment in its own right: when it was running, it effectively was in control of the system, and DOS was just one of the things it took care of. By Windows 3.11 for Workgroups, the core of Windows was largely a 32-bit operating system (although applications were mostly still 16-bit). That trend continued with Windows 95, 98 and Me, which added support for much of NT’s Win32 API (and thus 32-bit applications). In parallel, Windows NT was also improved to make it more relevant for “regular” users, in particular with better support for games (see How exactly did Windows become the OS of the home PC?), helped also by the increasing hardware capabilities in commodity PCs.

Ultimately, Windows NT (2000 and XP) became viable as operating systems for PCs across the board, and since by that time most PC users had switched to 32-bit Windows (Win32) applications, which could run on Windows 95/98/Me and NT, the switch was painless for most. A few DOS applications and games were left behind (e.g. games using 16- or 32-bit extenders which assumed they were in charge of the whole system), but by this time that was acceptable.

So the DOS kernel wasn’t really replaced, it just became irrelevant…

5
  • One might note that QDOS stood for "Quick and Dirty", something that sort-of works that one might use in a pinch if there were nothing else available. Microsoft didn't exactly turn it into something "clean", though I suspect they did manage to eliminate the "quick". Nov 20, 2022 at 21:35
  • @RayButterworth that’s the very first link in my answer ;-). Nov 20, 2022 at 21:56
  • NT may have not been designed from the start to replace Windows 3.x, but the way its design elements have transpired to DOS-based Windows over the years makes me wonder if it didn’t at some point become a designated successor, with Microsoft playing the long game of introducing NT APIs bit by bit to ease the transition. See for example Schulman pointing out how compatibility with NT was one of the requirements for Microsoft’s ‘Designed for Windows 95’ certification, and the later introduction of WDM to Windows 98. I admit this is pure speculation, though. Nov 23, 2022 at 15:11
  • @user3840170 yes, I agree there was a point at which it became the designated successor for DOS-based Windows. Then NT and DOS-based Windows cross-pollinated in such a way that they could replace each other, or at least serve as interchangeable platforms for the same software. My answer really needs a diagram of some sort to show the parallel histories and the influences from one to the other... Nov 23, 2022 at 15:35
  • I think it is worth pointing out that the limited scope of MS-DOS is right there in the name: It is an example of a DOS, a Disk Operating System. Like other DOS's, (TR-DOS, HDOS, etc) its purpose was to operate floppy drives and later hard disks. While it had drivers for the screen and keyboard, these were extremely primitive, the bare minimum needed to operate them as a glass teletype. It was just enough to format disks, copy files, and start programs. Once started, all but the simplest programs either had to use the (slightly) better drivers in the BIOS or include their own console drivers.
    – David42
    Jan 26, 2023 at 16:32
12

Older versions of Windows generally relied upon the notion that if only one program is trying to use a piece of hardware at a time, and that program knows how to use it, it doesn't really matter if Windows itself understands it. Many complaints about older versions of Windows being unstable were an offshoot of this. If a program sets up an interrupt handler to place data received via serial port into memory starting at some address, and Windows knows nothing about how the interrupt handler is planning to use that memory, it will have no way of knowing that it must disable the interrupt handler if the program that was using it gets terminated.

If one had a piece of hardware for which one had a DOS device driver, but no Windows driver, being able to use the DOS mode driver and hope that everything plays nice with it might be better than being unable to use the hardware at all, but there was and still is no way to have a really stable multitasking OS which doesn't understand device hardware that will be accessed by transiently-loaded applications.

In many cases, if one has a piece of specialized hardware for which one has a DOS driver, but for which no Windows driver will ever exist, the best way to continue using it will be to maintain a DOS machine for that purpose. While some people may find the idea of continuing to use DOS machines weird, if one has a $50,000 piece of industrial equipment which continues to do what it needs to do, maintaining a DOS machine to run it, along with few spares, may be much more practical than replacing the equipment or developing control software for a more modern platform, especially if one needs to avoid down time.

While there was a time when computers were sufficiently expensive that being able to use device-specific DOS software on a machine that was also used to run Windows, that time is now long past. Today, it makes far more sense to have the tasks which need to be done using DOS software on a machine running DOS, and have other tasks done on a newer machine running Windows, than to try to have one machine perform both kinds of task poorly.

9

Many, many reasons. But apart from anything else, DOS (and some of DOS-based Windows) was written in x86 assembler at a time when RISC machines were the speed demons.

Microsoft had a Portable Systems Group that were working on the "New Technology OS/2" platform; one of Microsoft's goals was to NOT tie it to specific hardware; thus early platforms were a homebrew machine based on the i860, and then MIPS machines.

After Microsoft and IBM's little spat, NT OS/2 became Windows NT (which wasn't technically hard, because the NT kernel, after Cutler's arrival, was designed to run multiple 'personality' subsystems, including OS/2 and Windows, so they simply placed more emphasis on the latter).

2

Thank you for the many answers. It made me think about the topic and I want to write an own answer because I think I understood now.

To understand the topic it is important to know what CPUs looked like when DOS was around and what they look today.

When DOS was around CPUs did not have protected mode. There was one single thread and it was allowed to do everything. DOS was run before any program was run and it also provides drivers and an API. Today there are these little Arduino development boards. I think the firmware on them is similar to DOS (about the points I mentioned).

Later CPUs had protected mode. Programs now have limited privileges and communicate with the kernel using system calls. From now on DOS is deprecated and all software now has to use the Win32 API.

The changes where simply too big. Maybe it would have been possible to keep the DOS API but because of the big changes it was easier to create a new API.

The change was necessary because CPUs got protected mode. That's the point.

7
  • 1
    If so, then why was DOS still used in 1984 when PC/AT with a 286 CPU that supports protection and user mode was released?
    – Justme
    Nov 23, 2022 at 19:26
  • @Justme Because it did not make use of it?
    – zomega
    Nov 23, 2022 at 19:26
  • Exactly. My point is, even having a PC with CPUs which had user mode in 1984, it only enabled further developement. The change away from DOS was not necessary just because CPU got protected mode.
    – Justme
    Nov 23, 2022 at 19:54
  • It was necessary. Who wants an OS that does not make use of protected mode? Nobody.
    – zomega
    Nov 23, 2022 at 20:13
  • 2
    Your answer gets a number of details mixed up but the gist of it is correct, DOS and the programs running on top of it were too closely tied to the 8086 and its real mode, so different operating systems had to be developed to take advantage of newer CPUs’ features. (Windows is a counter-example as far as the inevitability of this goes: it made the transition from real mode to 16-bit protected mode without needing changes in software running on it, then 32-bit protected mode with changes and now 64-bit long mode again with changes.) Nov 23, 2022 at 21:21
1

By 1996, Microsoft had two desktop operating systems for the same basic kind of x86 hardware:

  • Windows 9x, which used DOS as a loader, was a mixture of 16- and 32-bit code and had lots of non-portable assembler code.
  • Windows NT Workstation, which was entirely 32-bit, and portable onto other architectures (it also supported Alpha, MIPS and PowerPC, and it was not yet clear that Intel/AMD would win the desktop processor battle).

Microsoft produced Office, and most of their other software, in a single version that ran on both Win9x and IntelNT, so they had to keep those operating systems closely compatible. This involved a lot of duplicated work, and thus extra costs.

The advantages of Win9x were that it didn't need such powerful hardware, and it would let games access the hardware directly. Making the latter work without destabilising the OS was hard work, especially since Windows didn't get regular updates back then.

The correct thing to do from the perspective of Microsoft senior management was to make Windows NT capable of running games, so that it wasn't necessary to maintain two separate operating systems and keep them compatible. Doing this by allowing games to access hardware would have ruined the stability and reliability of NT, so they didn't do that.

Instead, Microsoft created DirectX, originally as a set of separate APIs called DirectDraw, Direct3D, DirectSound, and so on. These allowed games to be written in ways that allowed good performance without operating the hardware directly, so they could be compatible with NT.

The problem of NT's greater hardware needs was solved by waiting a few years, for powerful hardware to become cheaper, during which the gaming APIs could mature. This plan was completed in August 2001 with the release of Windows XP.

DOS was abandoned as a side-effect of abandoning Windows 9x, which was abandoned because maintaining two operating systems was expensive.

-2

i don't know if this is what you mean but here is my answer. MS-DOS stopped being used in windows xp. the last version to use it was windows ME and 2000. DOS was made to run 1 thing at a time so it kind of removed the whole "multitasking" thats microsoft wanted. plus, ms dos is over 40 years old now and is very outdated.

10
  • Why didn't they add multi-tasking to DOS and keep it up-to-date? Instead they replaced it with a whole new thing: Win32 API.
    – zomega
    Nov 23, 2022 at 13:40
  • 1
    @somega But that's exactly the point. Windows NT is the rewrite of DOS making it multitasking. You can't make DOS multitasking, as it's at it's core not made nor fit for that. Same way you can't turn a motorbike into a 14-wheeler by adding a few more wheel. At the same time it's less than 100 KiB of code. By windows ME it was an appendix to be cut of to heal the system.
    – Raffzahn
    Nov 23, 2022 at 13:50
  • 2
    But NT isn’t really a rewrite of DOS, it’s a brand-new operating system, with a Digital legacy if anything. And @Humancoder1123, 2000 wasn’t DOS-based either. Nov 23, 2022 at 13:58
  • 2
    @Humancoder1123 no, it doesn’t. Windows NT’s development started in 1988-89, with no roots in DOS; it was released in 1993, and evolved in parallel with DOS and DOS-based Windows. Windows 2000 was “Windows NT 5”. Nov 23, 2022 at 14:24
  • 1
    i didnt notice how it literally says "built on nt tech" in the boot screen of windows 2000. i deserve the downvote Nov 23, 2022 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .