8 ms·
A rant about some of the nice things in the NT kernel
- ck2 14y agoAre there any old-schoolers around here who remember IBM's OS/2 and how it could have changed the PC world completely http://en.wikipedia.org/wiki/OS/2 http://en.wikipedia.org/wiki/OS/2 Its design was supposedly far better than NT (it initially came on 50 5.25" disks, that was "fun" to install) I think UPS was the largest user/developer. You know the company Parallels that made Virtuozzo (and OpenVZ) - well it was initially formed to make virtual environments to run OS/2.
- pjmlp 14y agoSure! At the kernel level API it wasn't much different than Win32. I bet if OS/2 had gotten a better future, nowadays we would see rants about it similar to Win32. The SOM C++ API was quite interesting, a Smalltalk metaclass like system for C++. Another nice thing was the Visual Age for C++ provided an image like environment for C++, which made compilations quite fast.
- quotemstr 14y agoImage like? Like Emacs unexec?
- pjmlp 14y agoLike Smalltalk and Lisp Machines, well kind of. I never used, just read about it in DrDobbs back in the day. If memory serves me right, it imported the C++ code into a database and the editor was able to manipulate the code AST directly, but it consumed lots of memory, both RAM and disk space. Maybe someone with more knowledge can fill the gaps.
- pavlov 14y agoActually NT was originally supposed to be marketed as OS/2 3.0. The OS/2 project was a collaboration by Microsoft and IBM. Sometime around 1989-90, the latter was in charge of OS/2 2.0 while Microsoft was working on the next generation. The unexpected success of Windows 3.0 made Microsoft see they could do it on their own without IBM, so NT became the next generation of Windows instead. IBM's OS/2 2.0-4.0 was a competent 32-bit OS for its era, but NT's design was more modern. The only thing OS/2 had going for it was a smaller footprint (it could run on 8-16MB of RAM while NT practically required 32MB) and a more innovative user interface, but this advantage was basically eliminated when Microsoft ported the superior Win95 UI to NT.
- huhtenberg 14y agoFor what it's worth I remember a distinct feeling of being really frustrated with Warp's GUI. I don't remember the specifics, but one thing stuck out - it didn't have something as simple as "arrange desktop icons on the grid", so you'd end up with this mess on a desktop. The GUI might've been innovative, but it was inferior to Windows 95 and IBM didn't seem to care about that.
- cturner 14y agoAs I remember it - you'd put your icons about where you wanted them, but they wouldn't be aligned pixel perfect. So you'd right click and see "arrange desktop icons on the grid" and think that must be it. But that would rearrange everything starting at the top left, like modern Windows does. i.e. Rather than doing what you needed, it would destroy ten minutes of painstaking layout. There was no way to do the assisted alignment you actually wanted. They'd pitched a fabulous, malleable, document-centric desktop. Technically it was all there. They didn't quite get it to the user. People who were fluent in C could probably have done some quick fixes and made it hum. I think this was in version 2.0, and I watched it go unfixed in 2.1, warp. Can't remember if it was broken in 4, think so. Good example of the way OS/2 dev focused on ticking feature checkboxes (3d icons! a different dock! obscure mainframe compatibility features that mainstream users will never care about!) not users.
- Osiris 14y ago
- ksk 14y agoDon't recall the initial versions, the only one I used was OS2/Warp in August '95 and it was awesome ! (IIRC it came on a CD)
- ics 14y agoI seem to remember having OS/2 on a few computers at school (K-8) for some reason, but those were the days that most were running Win95 and there were just a couple Macs that nobody knew what to do with (I eventually got permission from the IT team to "set them up", which was basically just feeding floppies and pressing okay). I think the MTA (in NYC) still uses it to process subway fares...
- captaincrowbar 14y agoI did a lot of development on OS/2 applications in the mid 90s, mostly on the Warp 3.0 version. Eventually we switched to Windows NT4 once it became clear that OS/2 had had its fifteen minutes. I quite liked it at the time, but to be honest I think the wistful "could have changed the PC world completely" stuff I sometimes hear is just rose tinted nostalgia. It was a very good OS for its time; its main competition then was Windows 95, and there was certainly no contest there. But the NT kernel was a different matter, especially after it got a saner UI in NT4. There were no huge advantages to one or the other there (with one exception, see below). Compared to very different modern OSes such as OSX or Linux, OS/2 and NT4 were close siblings. OS/2's one real Achilles heel, which gave us endless trouble, was the synchronous input queue, shared by all programs that had a GUI (including the OS desktop). The upshot of this was that, if a user-facing program crashed, it was very likely to freeze up the OS and require a hard reboot. When we switched to NT4, the vast improvement in reliable uptime was a breath of fresh air (if nothing to write home about by modern standards). I gather they partially fixed this in OS/2 4.0, but by then the writing was on the wall. OS/2 faded away before the rise of modern malware had really hit its stride, but I suspect the SIQ problem would also have led to all sorts of security issues. For example, look up "shatter attack"; that was bad enough on Windows, but I'm pretty sure OS/2 would have been even more vulnerable to that sort of technique. While I certainly wouldn't claim that son-of-NT's victory over OS/2 had anything to do with its technical merits, I do think that, at least between those two lines of development, the (slightly) better OS won.
- pavlov 14y agoOS/2's one real Achilles heel, which gave us endless trouble, was the synchronous input queue So there was basically one global event loop for the entire OS? Interesting. I can see how that would make the window system a lot simpler to write -- not unlike the reasons why Node.js and other evented web frameworks have become popular. At the same time it is, as you mention, an approach that would have been doomed to fail spectacularly by the late '90s when it became commonplace for desktop OSs to run unverified code downloaded from the Internet...
- quotemstr 14y agoAh, so in OS/2, it's as if every program called AttachThreadInput on every other thread? Why was it designed that way in the first place?
- bdunbar 14y agoMy boss was huge into OS/2 at the time. He got it up, and running, at home, and work. Reported (and I recall agreeing after playing with it) that it was a better environment to run windows / DOS applications than was Windows. Our employer (the US Marines) was not officially interested in the idea ... and so the idea never went past that.
- ams6110 14y agoI think "a better Windows than Windows" was an official IBM marketing line for OS/2 for a while. I used it for a while in the early 1990s as a contractor in an "IBM shop". Literally everything they bought was IBM. From the mainframe to Terminals, printers, PCs, OSes. I remember it being painfully slow.... but the PS/2 PC it was running on was probably underpowered (as is typical, contractors got the oldest hand-me-down workstations).
- mjg59 14y agoIn the time since that comment was written (just under 5 years), Linux replaced most graphics drivers with ones based on in-kernel modesetting and the DRI2 interface. This was done without breaking applications. So, the assertion that changing the video driver model would be disruptive is kind of disproven by reality. I guess Linux has a liberal bias. That's not to say that NT doesn't have benefits. Linux is still catching up with implementing some features that Windows has had for some time (and multiple GPU support is actually a great example of that), but so far there's no real evidence that these disparities are because of architectural differences. Really, a worthwhile comparative analysis requires someone who has a deep understanding of the kernels they're comparing. I'm pretty familiar with Linux but know almost nothing about NT, so I'm a bad choice. But "Take the recent Linux arguments about the HardLocks code that is giving Linux trouble with multi-processor granularity"? That's not someone who knows Linux, otherwise they'd be using words that I recognise. "You call BSD a kernel, it technically is a set of APIs"? That's not someone who knows BSD either. This isn't an in-depth analysis of benefits that one kernel has over another. It's a handwavy justification of some NT design decisions without any reasoned comparison to Linux design decisions in the same area. I'd love to read an in-depth comparison of the benefits of NT over Linux. This isn't it. Is there one?
- shritesh 14y agoThis might be wrong, but from what I've heard, multiple GPU (nVidia Optimus) issue has more to do with GPL than the Kernel itself. I had saved this quote but I forgot the source. > ...won't let closed source drivers use shared memory with open source code or somesuch out of their belief that it would violate the GPL.
- sounds 14y agoI believe you're referring to: http://linux.slashdot.org/story/12/10/11/1918251/alan-cox-to-nvidia-you-cant-use-dma-buf http://linux.slashdot.org/story/12/10/11/1918251/alan-cox-to... http://www.phoronix.com/scan.php?page=news_item&px=MTIwOTI http://www.phoronix.com/scan.php?page=news_item&px=MTIwO... Footnote: I don't believe I first read it on slashdot. That was just the first hit when I googled and it seems to summarize the debate fairly well.
- wfunction 14y ago> MinWin MinWin (affecting Kernel32.dll) has nothing to do with the NT kernel.
- quotemstr 14y agoYou have no idea what you're talking about.
- wfunction 14y ago> You have no idea what you're talking about. Care to elaborate why, instead of just accusing? FYI, MinWin is completely a user-mode library change; it has nothing to do with the kernel. Even Wikipedia explains the misconception: https://en.wikipedia.org/wiki/MinWin#cite_ref-14 https://en.wikipedia.org/wiki/MinWin#cite_ref-14 On the other hand, there is such a think called "MinKernel", which is related to the kernel itself: http://cdn-static.zdnet.com/i/r/story/70/00/013290/minwinminkernel-620x428.png http://cdn-static.zdnet.com/i/r/story/70/00/013290/minwinmin...
- quotemstr 14y agoI've already said too much. I just want to emphasize that the whole thing is quite subtle, and it's hard to make sense of it given only public information. What you should focus on is the documented ABI available on each OS and platform since that's the real place where what we do affects what you do.
- wfunction 14y ago> I just want to emphasize that the whole thing is quite subtle, and it's hard to make sense of it given only public information. Well, I made sense of it using only public information, and yet you claimed "You have no idea what you're talking about". Obviously that means you must know better than me, so care to share where I made a mistake?
- meanguy 14y ago
- nailer 14y agoThe article (not the comment linked to, which was quite informative) also has this: > Anyone that’s ever manually compiled a Linux kernel knows this. You can’t strip ext3 support from the kernel after it’s already built any more than you can add Reiser4 support to the kernel without re-building it. Even 5 years go (and at least 10 years ago) you could remove ext3 and add add another filesystem without rebuilding the kernel. I know Red Hat at least included a helpful Makefile for precisely this purpose. Rebuilding entire kernels in order to compile a single kernel module is a well known habit of early Linux uses, following advice from pre 2.x kernel days when loadable modules didn't exist that seems to have stuck around in the collective mind of the Internet.
- ithkuil 14y agoBefore distributions switched to initramfs, you had to have at least one filesystem compiled in, for bootstrap reasons, so that the kernel could mount the initrd. I don't remember exactly when did initramfs get introduced, but I remember it was a relatively long time before major distros switched to it. TFA is old enough so that might have been the case back then.
- nailer 14y ago10 years ago we still had mkinitrd in RH (source: I'm a programmer now, but in 2003 I was worked for Red Hat as an instructor for these topics). Initial RAM disks still had kernel modules in their gzipped filesystem and were rebuild able without rebuilding the kernel.
- aaronbrethorst 14y ago> “Soma” It's weird to me that the original blog post put Soma's name in "scare quotes." Soma is the Corporate VP of Developer Division at Microsoft, which means he's in charge of—among other things—Visual Studio, .NET Framework, ASP.NET, the now-dead Expression Studio, and I'm sure a few other things. He goes by Soma because his full name is Sivaramakichenane Somasegar (really, I looked it up in Headtrax once and remember it, for whatever reason, seven years later). And, let's be honest, that is really hard to spell.
- quotemstr 14y agoI know a few mononymed developers myself. What's strange is that they're all awesome.
- deleted 14y ago[deleted]
- coldtea 14y agoThe neosmart.net post was totally ignorant. And he dismissed "Shipping Seven" with hysterical handwaving and BS pedantic arguments, that were even wrong. He could not understand what SKUs were, he thought Seven referred to Windows as merely a kernel, like what you build in Linux, and other BS, he made some BS comments that only apply to monolithic kernels and ONLY if you compile extensions instead of loading them as modules...
- michielvoo 14y agoGiven that the source code of the NT kernel is apparantly available for academic purposes, I wonder if there are university courses where the NT kernel is used as the subject, and students are exposed to this code. Does anyone have that experience?
- quotemstr 14y agoAt least one course uses NT. http://www2.cs.uregina.ca/~hamilton/courses/330/notes/memory/page_replacement.html http://www2.cs.uregina.ca/~hamilton/courses/330/notes/memory...
- ulpis 14y agoThe NT kernel represents all strings as UTF-16 internally AND in the syscall API. This single fact is enough to make it clear that it's a piece of shit.
- ComputerGuru 14y agoSo? NT predates UTF-8. UTF-8 and UTF-16 are both awesome - they provide unicode support. Windows first shipped with UCS-2 at a time when the rest of the world was stuck with ASCII and various random codepages, then switched over to UTF-16 at around the same time UTF-8 was picking up speed; UTF-16 had the unique advantage of being (mostly) backwards-compatible with UCS-2, whereas UTF-8 would have broken everything. I prefer UTF-8 myself, but that doesn't make UTF-16 a bad choice. In fact, while for the default ASCII range of characters UTF-16 consumes one extra byte over UTF-8's single-byte encoding, once you get into the "normally-used range" of international characters, UTF-8 quickly jumps to 3 bytes while UTF-16 remains at two.
- nbevans 14y agoThere's nothing wrong with UTF-16.
- Dylan16807 14y agoYes there is. It's variable width without being backwards compatible to ASCII. Even worse it's variable width but lets people assume it's fixed-width. UCS-2 was okay. UTF-16 is a hack.
- United857 14y agoFrom a developer's perspective, the main problem facing Windows is not the kernel itself -- despite common misconceptions to the contrary. For example, OS X is built on a BSD which has it's roots in 60's and 70's OS design, just like the VMS roots of WinNT. OS X didn't change the world by bringing some great new underlying architecture to the table. In fact, their kernel and filesystem are arguably getting long in the tooth. The value that OS X brought to the table was the fantastic Carbon and Cocoa development platforms. And they have continued to execute and iterate on these platforms, providing the "Core" series of APIs (CoreGraphics, CoreAnimation, CoreAudio, etc.) to make certain HW services more accessible. There's very little cool stuff to be gained in the windows world by developing a new kernel from scratch. A quantum leap would not solve MS's problem. The problem is the platform. What's really dead and bloated is the Win32 subsystem. The kernel doesn't need major tweaking. In fact, the NT kernel was designed from the beginning such that it could easily run the old busted Win32 subsystem alongside a new subsystem without needing to resort to expensive virtualization (as the original article mentions). Unfortunately, the way Microsoft is built today it have a fatal organizational flaw that prevents creating the next great Windows platform. The platform/dev tools team and the OS team are in completely different business groups within the company. The platform team develops the wonderful .NET platform for small/medium applications and server apps while the OS team keeps crudging along with Win32. Managed languages have their place, but they have yet to gain traction for any top shelf large-scale windows client application vendors (Adobe, even Microsoft Office itself, etc.) Major client application development still relies on unmanaged APIs, and IMHO the Windows unmanaged APIs are arguably the worst (viable) development platform available today. What Windows needs is a new subsystem/development platform to break with Win32, providing simplified, extensible unmanaged application development, with modern easy-to-use abstractions for hardware services such as graphics, data, audio and networking. This is starting to come to fruition with WinRT, but the inertia in large scale apps is unbelievable.
- vxxzy 14y ago"Anyone that’s ever manually compiled a Linux kernel knows this. You can’t strip ext3 support from the kernel after it’s already built any more than you can add Reiser4 support to the kernel without re-building it." Ummm.. Kernel modules anyone? Or do I have something wrong here? Have I taken something out of context?
- eschaton 14y ago"[M]ulti GPUs may not have existed when XP was released" The NT kernel had been shipping for about 10 years by the time XP was released. Windows NT 3.5 and earlier didn't have any kernel-level graphics (though they did have kernel-level drivers); kernel-level GDI came in NT 4 (1995-1996) for performance. Windows NT was also used by some graphics workstation vendors like Intergraph and SGI, whom I presume did support multiple GPUs like most workstation vendors did. Macs also had actual GPUs (not just frame buffers, but real QuickDraw accelerators) and supported multiple GPUs in the late 1980s - on System 6! All it really takes is a reasonable display abstraction model/API, and an ability for that to interface reasonably with hardware drivers. Seems Linux could've handled that too - and it wouldn't surprise me if it did, at least theoretically. I didn't follow Linux's initial development as 386BSD had already come out. I do remember the first accelerated X11 for 386BSD supporting some card with a number like 911. I don't recall that it required explicit kernel support, other than perhaps a bunch of ioctl calls or something like that.
- gnu8 14y agoThis article is just wasted bytes since no one can work with the code or even see it. The author may as well be talking about a fictional kernel. Closed source isn't worthless because of its terrible code quality, closed source is worthless because it is closed.
- wazoox 14y agoThe guy mentions that it's still possible for academics to get their hands on NT sources. I suppose, however, that it's forbidden to modify or compile them. At some point in time, NT (3.1) was apparently shipped in source form: there was no binary distribution for the first 4 and 8 processors systems back then and you had to compile your kernel yourself on the target machine (after installing the vanilla NT first).
- hga 14y agoXen 1.x development included a paravirtualized Windows XP using this program (http://en.wikipedia.org/wiki/Xen#Microsoft_Windows_systems_as_guests http://en.wikipedia.org/wiki/Xen#Microsoft_Windows_systems_a...): "During the development of Xen 1.x, Microsoft Research, along with the University of Cambridge Operating System group, developed a port of Windows XP to Xen — made possible by Microsoft's Academic Licensing Program. The terms of this license do not allow the publication of this port, although documentation of the experience appears in the original Xen SOSP paper."
- sproketboy 14y agoFUCK NT AND FUCK MICROSHITE