Linked by Thom Holwerda on Sun 16th Apr 2006 15:36 UTC
OSNews, Generic OSes Right in between a car crash and Easter, I knew I had to write a Sunday Eve Column. So here I am, digesting vast quantities of chocolate eggs (and I don't even like chocolate), craving for coffee (for me about as special as breathing), with the goal of explaining to you my, well, obsession with microkernels. Why do I like them? Why do I think the microkernel paradigm is superior to the monolithic one? Read on.
Thread beginning with comment 115326
To view parent comment, click here.
To read all comments associated with this story, please click here.
ivans
Member since:
2005-12-03

Wowwow there, NT is a hybrid kernel. It started out as a true muK (Tanenbaum even compared MINIX to NT), but slowly but surely more things were added into kernelspace.

No, NT is NOT a microkernel, and was never designed to be one. It has

1) ring0 drivers
2) all non-essential kernel services, which are traditionally implemented as user-mode (ring3) servers in pure microkernels such as Mach, are in ring0
3) it has even super-nonessential stuff in ring0 such as GUI, traditionally in ring3 on *NIX

There is no way to communicate between, lets say, Memory Manager and the Scheduler via formal IPC (msg_send() and msg_receive() in Mach) - they are ALL inside one statically compiled nonseparable module.

Wikipedia article is somewhat clueless, and paradoxical IMHO:

The kernels of the operating systems in this line are all known as hybrid kernels as their microkernel is essentially the kernel, while higher-level services are implemented by the executive, which exists in kernel mode.

So it basically this sentence says: kernel = microkernel, but upper-level services are still ring0, like the microkernel itself :-)

But if both higher-level services and the "microkernel" are in the same privilege level, they must be in the same address space, meaning no protection, no security, no mutual IPC - ie. no microkernel design at all ;)

As i said - calling NT a hybrid microkernel is just a marketing propaganda from the 90s, when the term microkernel was hot stuff.

Reply Parent Score: 5

Thom_Holwerda Member since:
2005-06-29

No, NT is NOT a microkernel, and was never designed to be one.

I'm sorry, but if I have to choose between believing you in saying NT did not start out as a muK, and andy Tanenbaum saying it did, I prefer the latter. No offense.

it has even super-nonessential stuff in ring0 such as GUI, traditionally in ring3 on *NIX

That's a subjective matter. A kernel is hybrid when it combines both worlds; some parts live in kernelspace, while others do not. Exactly what goes into kernelspace has absolutely nothing to do with it. You might argue that the desktop is not supposed to be in kernelspace-- but for a desktop operating system... I'd say the desktop is important and therefore giving it a speed bump by placing it in kernelspace makes sense. The reason the GUI does not live in kernelspace in UNIX is because, well, UNIX is not a desktop operating system. Using UNIX as a benchmark for defining how a desktop operating system should handle its kernel is like asking a butcher to explain to the bakery how to make bread.

But if both higher-level services and the "microkernel" are in the same privilege level, they must be in the same address space, meaning no protection, no security, no mutual IPC - ie. no microkernel design at all ;)

Err... Exactly, because the NT kernel is indeed not a muK, it's a hybrid. And by hybrid one means that certain parts live in kernelspace, while others don't. And since NT is very flexiable and modular, they can move stuff in and out of kernelspace relatively easily (hence the GUI in Vista will live in userspace again).

Reply Parent Score: 5

ivans Member since:
2005-12-03

I'm sorry, but if I have to choose between believing you in saying NT did not start out as a muK, and andy Tanenbaum saying it did, I prefer the latter. No offense.

Look Thom, I've read most of the available windows internals literature, even that leaked W2K source code, spent countless hours disassembling NTOSKRNL.EXE and even reported some kernel bugs to MS lately, and found absolutely no proof that NT was ever to be or has been a microkernel. Function calls between various executive components are so interleaved that there is absolutely no chance of decoupling them. Ever.

Noone questions Mr. Tanenbaum's authority on general OS design theory, distributed systems, compiler and automata theory etc. - but I think that in this case, he fell on MS's marketing crap. Heck, even Cutler said they're building something different from RSX-11M (which was a microkernel).

Read the relevant literature (Russinovich/Solomon is great for starters), or check out the discussions on this "microkernel issue" on comp.os.ms-windows.programmer.nt.kernel-mode.

That's a subjective matter. A kernel is hybrid when it combines both worlds; some parts live in kernelspace, while others do not. Exactly what goes into kernelspace has absolutely nothing to do with it.

Oh, it certainly has. "Hybrid microkernel" is in this context so vaguely defined term it can be applied on any OS you like. Let me put it like this: NT has inside kernel-mode (ring0) almost anything that traditional monolithic *nix kernels (Linux, Solaris, *BSD etc.) have + GUI. So can anybody tell me what the hell is so microkernelish about it, that other monolithic OSes don't have, so that it can be entitled as "hybrid microkernel"???


And since NT is very flexiable and modular, they can move stuff in and out of kernelspace relatively easily

No they can't ;) I would really like to see a hacker capable of putting, lets say, Object Manager, inside user-mode server process and routing all handle-checking logic via IPC on it :-)

(hence the GUI in Vista will live in userspace again).

I thought we've demistifyed that one..

http://osnews.com/permalink.php?news_id=13007&comment_id=74945

Reply Parent Score: 5

Cloudy Member since:
2006-02-15

Tannenbaum's wrong on this one. Cutler et al started out designing NT along similar lines to VMS, which he had worked on at DEC. Early Microsoft documentation on the NT structure makes this non-microkernel architecture very apparent. About the time of the Seattle OSDI, Mach was gaining mind share, and Cutler came to OSDI with a presentation declaring NT to be "micro kernel based". It was, by far, the funniest presentation I've ever seen.

Early on, a "microkernel" system was thought to be one in which message-passing was used to separate functional subsystems. This comes from Mach's predecessors, especially Accent.

Mach was originally intended to be a "pure" message-passing mostly user space OS ala Accent, but DARPA demanded that Mach be Unix compatible if Rashid wanted DARPA funding. From this was born the BSD/Mach hybrid crap that ended up dying such a horrible death as OSF/1.

"microkernel" is a silly idea. It specifies an implementation technology (and one based on the hardware privilige model of a particular processor architecture at that) as a solution to an architectural problem.

That's the real reason why "microkernel" never made it out of academia into any widespread commercial use.

Reply Parent Score: 3

galvanash Member since:
2006-01-25

I'm sorry, but if I have to choose between believing you in saying NT did not start out as a muK, and andy Tanenbaum saying it did, I prefer the latter. No offense.

Mr. Tanenbaum never said that NT started as an muK. He would have had no way of knowing that. He was merely parroting what Microsoft was saying as they were promoting their new OS and he foolishly took them at their word. This was WAY before NT shipped btw... You might be interested to see what he has said since then:

http://www.cs.vu.nl/~ast/brown/followup/

Quote straight from the horse's mouth (about 3 quarters of the way down):

"Microsoft claimed that Windows NT 3.51 was a microkernel. It wasn't. It wasn't even close. Even they dropped the claim with NT 4.0."

You can call it a "Hybrid" if you like, but that is nothing more than marketing bullshit. Hybrids are simply what companies call monolithic kernels to sound cool... ;)

Mr. Tanenbaum defines a muK the same way as most academics, a small kernel that does AT THE MOST memory management, scheduling, and IPC. EVERYTHING else, including all drivers, file systems, etc. should communicate with the kernel from userland. Period. By that definition neither NT nor OSX are even close to being microkernels.

Reply Parent Score: 1

siride Member since:
2006-01-02

You clearly don't know what you're talking about. NT has sophisticated IPC mechanisms (such as APC and LPC) and most non-essential services live outside the kernel. The sole exception is win32k.sys and that's inside the kernel only in the sense that it lives in ring0. It's still it's own separate module that used to be in csrss.exe (which still exists as a microkernel style server, mainly for console apps).

The desktop is NOT integrated into the kernel. It's called explorer.exe and you can easily terminate it from task manager and use something else. A great deal of services run in usermode (ever seen the crapload of svchost.exe instances running?). Yes, the drivers run in kernel space, but this, like win32k.sys, is done for performance reasons and now that computers are fast enough, drivers and graphics will move back out into userspace in Vista.

Reply Parent Score: 3

ivans Member since:
2005-12-03

NT has sophisticated IPC mechanisms (such as APC and LPC) and most non-essential services live outside the kernel.

But you're missing the point (i didn't say that NT doesn't have IPC, it's just NOT USED for communication between different kernel components, because they live in the same address space - the upper 2 gigs) - in microkernel "nonessential services" are anything but the scheduler/IPC.

YOU CANNOT SEPARATE ANY EXECUTIVE NT KERNEL COMPONENT INSIDE A USER-MODE PROCESS.

The desktop is NOT integrated into the kernel...

I didn't claim it was. You seem to be constantly proving something I didn't say, in order to apper correct in other things.

http://en.wikipedia.org/wiki/Ignoratio_elenchi

Anyway, I would like to hear in just which ways is NT more microkernelish than, say Linux? :-)

Reply Parent Score: 5