The truth about MinWin: the heart of Windows 7

MinWin
The Windows flag of MinWin might be why some people think it's a whole new OS

For something that's supposed to be small, self-contained and all about simplifying Windows, MinWin causes a lot of confusion.

Microsoft Technical Fellow Mark Russinovich laid out the technical details at Microsoft's TechEd conference, so we've gathered together the essential information you need to know about it.

Yes, MinWin is in Windows 7 (and Windows Server 2008 R2). No it's not a new kernel.

Instead, it's an attempt to rewrite the most basic foundation of Windows – not just the kernel, but also the basics of the file system and network connection, with drivers and services – as a self-contained and logically separate system. With a clean division instead of complex interconnections, it will be much easier to improve and add to Windows – without causing compatibility problems.

"Windows has grown up organically over time and it consists of thousands of EXEs, DLLs and APIs," explains Russinovich; "Everything depends on everything. We've got 600 binaries; if we took one of them you'd break stuff and we can't even tell you what would break. When we go and change Windows, we end up changing the behaviours of those interconnects at deep levels."

MinWin, he says, is "carved out of the rest of Windows". It takes up 25MB of disk space and 40MB of memory.

It can build without the rest of Windows, it can boot without the rest of Windows and it can access the network. That doesn't mean it would ever be a super-slim command-line-only operating system – just that it's self-contained rather than dependant on anything else.

SLIM: MinWin is more than the kernel – but not a lot more.

To create MinWin, Microsoft drew a line across the lowest-level of the Windows architecture. Because of the spaghetti-like interdependencies, that line cuts through DLLs and other low-level system services. "We had to figure out how to move stuff into MinWin and how to move stuff out," says Russinovich.

Where the system calls belonged in MinWin, the Windows team created brand-new DLLs as part of MinWin (the main one is called KERNELBASE.DLL) but applications that depend on the old system calls don't break because they get forwarded to the new DLL. That's how Microsoft has managed to change the most basic level of Windows without breaking every single Windows program.

CLEAN CUT: Making MinWin meant rewriting everything that the line cuts through – so rewriting things above the line will be easier in the future.

MinWin is just the first step; Russinovich calls it "foundational work for Windows to undo the sins of the past and get everybody to a better place".

There are more changes to come in the kernel in the future – Microsoft wants to make it run everywhere from the data centre down to ARM-style processors in smartphones one day – but they don't mean an entirely new version of Windows written from the ground up because once Windows is neatly sliced into layers, you can change one of them without rewriting everything.

Contributor

Mary (Twitter, Google+, website) started her career at Future Publishing, saw the AOL meltdown first hand the first time around when she ran the AOL UK computing channel, and she's been a freelance tech writer for over a decade. She's used every version of Windows and Office released, and every smartphone too, but she's still looking for the perfect tablet. Yes, she really does have USB earrings.