Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Windows NT/OS2 Design Workbook (computernewb.com)
109 points by markus_zhang 16 hours ago | hide | past | favorite | 40 comments
 help



The section coding.pdf has their code style guidelines, colloquially known as Cutler Normal Form, CNF for short. I'm conflicted on it. Definitely overly verbose, but you can't argue with the results of the NT team. Such a rigid style guide almost feels like the technical version of a dress code. And there's an idea called "enclothed cognition" which is like, if you wear a business suit to work, it exerts a subconscious influence that results in you taking the work more seriously, focusing your attention, etc: https://en.wikipedia.org/wiki/Enclothed_cognition

It's also important to remember that a ton of things we take for granted now simply didn't exist (source code control was in its infancy, merging was shit, syntax highlighting was minimal at best, compiling took time, etc).

At least there was this...

> Note that the NT OS/2 system does not use the Hungarian naming convention used in some of the other Microsoft products.


I agree that in general people are influenced by their perception of themselves. For example I always pretend I'm a kernel programmer when hacking on small kernels. This did lend me a lot of patience to debug and figure things out, which I do not have for my work.

For those unclear on what the large pile of .doc and .pdf files are, it appears to be some revision of the design documents for "NT OS/2", which then turned into just NT. This appears to be the Smithsonian description of their physical copy: https://www.si.edu/object/microsoft-windows-nt-os2-design-wo...

Yeah I think this is the original design doc for NT.

My favorite part of NT is the Local Procedure Call (now obsoleted by ALPC): https://computernewb.com/~lily/files/Documents/NTDesignWorkb...

Very cool to be able to read the original design instead of just reverse-engineered ones. Thanks for posting!


> The first release of NT is planned as a workstation product that will provide a strong competitor to UN*X based workstations.

UN*X spelling for trademark reasons or a joke that UNIX is verboten at Microsoft?


That was back when there was "real" UNIX around, as well as a number of clones, including Microsofts own Xenix (maybe they had offloaded that to SCO by then). So UN*X was one way to indicate that it meant UNIX-like OSes.

Turns out SCO bought Xenix in 1987, but Microsoft was just a couple of years removed from being the biggest Unix vendor around at this point.

I guess that's probably Apple now.

Or IBM?

z/OS is officially a Unix


There are an awful lot of iOS and macOS devices out there

macOS is a certified UNIX[0], but iOS isn’t.

[0] https://www.opengroup.org/openbrand/register/


It is a generic way to refer to unix and unix-like systems. It is still in use today, e.g. to indicate Linux as part of the set. For this document most likely it refers to Xenix (MS's unix).

Eunuchs is already a plural word.

IIRC Microsoft's internal email still ran on Xenix at the time (until Exchange betas got good enough for internal use c. 1995?), so perhaps more trademarks than some sort of absolute hatred of Unix. Also note that one of the two APIs that NT OS/2 was initially going to support was POSIX, albeit perhaps more because the US government wanted that than a true love of UNIX. Although the design rationale document (ntdesrtl) does lament that existing POSIX test suites tend to also test "...UNIX folklore that happens to be permissible under an interpretation of the POSIX spec".

Did Microsoft never run Microsoft Mail internally?

It was an email system that ran on top of file system. If I recall, mail clients connected over a networked drive to access mailboxes. So it was never regarded as being very scalable.


Yes, MS Mail for PC Networks used a shared file system for email.

The Workgroup Apps (WGA) divison ran MS Mail for PC Networks since they produced MS Mail. Gotta dogfood your product. The WGA email system used a Xenix gateway to connect with the rest of Microsoft.

The rest of Microsoft ran MS Mail for Windows with a Xenix email backend and address book, since MS was already using Xenix before MS Mail for PC Networks existed.

Windows for Workgroups 3.11 contained a one postoffice-version of MSMail, (which could be upgraded to the full version).

Some more Microsoft email-related history at https://en.wikipedia.org/wiki/History_of_Microsoft_Exchange_...


As others are saying, the * is meant as a wildcard, not as censorship. It's meant to also cover the likes of Linux or Xenix etc, although there isn't actually any other name that would strictly fit the pattern of "UN*X".

I think trademark, I remember Bill Gates referring to Windows NT as "a better UNIX than UNIX".


I think this is the only place that hosts a (hopefully) full electronic copy of the book.

I particularly like this bit in ntdesrtl.pdf:

"6.1 OS/2 Standards

Our initial OS/2 API set centers around the evolving 32-bit Cruiser, or OS/2 2.0 API set.

(The design of Cruiser APIs is being done in parallel with the NT OS/2 design.) In some respects, this standard is harder to deal with than the POSIX standards. OS/2 is tied to the Intel x86 architecture and these dependencies show up in a number of APIs. Given the nature of OS/2 design (the joint development agreement), we have had little success in influencing the design of the 2.0 APIs so that they are portable and reasonable to implement on non-x86 systems. In addition, the issue of binary compatibility with OS/2 arises when the system is back-ported to an 80386 platform.

This may involve 16-bit as well as 32-bit binary compatibility."

Very "professional" coded writing that expresses a frustration with the need to collaborate with IBM that could have been more succinctly written if they had the option to use a few choice four letter words.


This is giving me flashbacks to the times when I had to implement systems based on big, verbose specification documents like this. Horrible.

If you really want to understand Windows, skip this and check out Windows 2000 Internals by Solomon and Russinovich (Win2k is a good middle-ground where Windows had matured a bit).


For more modern Windows, Windows Internals Parts 1 and 2[1][2], and Windows 10 System Programming Parts 1 and 2. Basically anything by Yosifovich, Russinovich, Ionescu et al.

[1]: https://www.microsoftpressstore.com/store/windows-internals-...

[2]: https://www.microsoftpressstore.com/store/windows-internals-...

[3]: https://leanpub.com/b/windows10systemprogrammingP1and2


Yeah this is definitely a hell of read which probably has more historical values than real ones. The book "Inside Windows NT" also gives a good overview about Windows NT 3.1. There is another one called "Understanding Windows NT File System" which talks about the fs I think.

The biggest problem is NT is not open-source, and while there are leaked copies posted online, there is no "official" build guide so people have to try their luck.


It's giving me flashbacks to a few months ago.

(*cries in X12 270/271*)


So.. you had _all_ this.. and for some reason just didn't want turn it into a useful set of "man" pages in your OS?

If they had their eye on the actual ball they wouldn't need to write Halloween memos and rant about developers on stage.


This mostly describes stuff to do with the [Windows] NT [OS][/2] (delete as appropriate) kernel layer, which normal mere mortals aren't supposed to interact with. You're supposed to use stuff like the Win32 KERNEL32.DLL not the more direct DLL, NTDLL.DLL (a DLL). Of course, true hackers scorn such abstractions.

I think Windows and DOS do have good documents. I actually think they had way better ones than Linux at the time. But I could be wrong.

For reference:

https://jacobfilipp.com/msj-index/

And also MSDN.


Windows programming guides provided by Microsoft were simply amazing for the time; the documentation available was excellent.

Part of the reason they did so well, companies could easily implement software using the new APIs.

Of course, they also had secret and undocumented APIs that people found and wanted to use ...


Was MSDN always free? I remember their access prices for the services in the late 90s and early 00s were eyewatering.

If I recall, MSDN was super expensive but that is because it included non-commercial licenses for just about everything Microsoft shipped as well as getting hard copies of the documentation and a bunch of other stuff.

If you just wanted to do c++ windows programming you can get visual studio which, I believe, did come with Win32 documentation (especially as CD roms became common distro methods).

The c++ software development kit itself (just libraries, documentation, and samples, no tooling) wasn't too expensive and was mainly material costs.


When I was a student, they gave away this stuff like candy.

I think it was included into the development tools, like VS Professional. So maybe not free until much later.

I have a hot take. manpages are really bad for noob examples, or if you actually want to learn how to use something. They are great references if you already know 95% of the tool, but for the most common use cases, they completely lack any sort of examples.

In this sense, LLMs (as much as I am sceptical about them) are much more useful.


This depends a lot on what manpage you're looking at.

When I learned C more than 20 years ago, I found libc manpages a pretty good way to learn. For many functions in section 3, you can read the manpage and make an intelligent guess on how it's implemented, and write your own implementation. I did this as an exercise back in the day.


Yeah I agree, TBF I rarely found man-pages to be useful to me, while so far LLM is pretty good at bash scripting, at least at the level that I need. But of course still wants to learn this stuffs in depth.

Microsoft's eye wasn't on open sourcing their OS and describing the deep internals. They still don't want you to develop against the NT API, even though developers certainly do (and Microsoft makes compatibility shims for applications which do, when required).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: