Home > OS Internals, Tech, Windows > Does Windows have a Microkernel or Monolithic kernel?

Does Windows have a Microkernel or Monolithic kernel?

February 20, 2011 Leave a comment Go to comments

Like most Unix systems, Windows is a monolithic operating system. Why? Because the kernel mode protected memory space is shared by the operating system and device driver code.

But don’t take my word for it, from Microsoft’s Curriculum Resource Kit (written by Mark Russinovich and Dave Solomon, authors of Windows Internals):

Is Windows a microkernel-based OS?

  • No – not using the academic definition (OS components and drivers run in their own private address spaces, layered on a primitive microkernel)
  • All kernel components live in a common shared address space
  • Therefore no protection between OS and drivers

Why not pure microkernel?

  • Performance – separate address spaces would mean context switching to call basic OS services
  • Most other commercial OSs (Unix, Linux, VMS etc.) have the same design

But it does have some attributes of a microkernel OS

  • OS personalities running in user space as separate processes
  • Kernel-mode components don’t reach into one another’s data structures
  • Use formal interfaces to pass parameters and access and/or modify data structures

Therefore the term “modified microkernel”

Further reading at TechNet on the Windows NT 3.51 kernel reveals more relevant information:

A microkernel, on the other hand, is the name given to the core portion of a modern, modular operating system. Microkernel operating systems are based on two fundamental principles. The most basic principle is one of modularity, encapsulation, and data hiding. In this aspect of the design, there is one and only one portion of the operating system that has system-wide responsibility for a particular function.

All other parts of the operating system (as well as applications, naturally) access that function through a well-defined interface. There is no duplication of function and no “back doors” to critical data structures; all access to system data structures is through software interfaces. This approach makes it possible to upgrade or replace entire modules within the system without disturbing the remainder.

A secondary principal of the microkernel design, related to the first but focused more on the implementation strategy, is that large portions of the operating system which traditionally run entirely in the kernel or privileged mode of the microprocessor can now be executed in user or application mode, with only the microkernel itself, along with a relatively small amount of hardware device-specific code, executing in kernel mode.

Operating systems that follow both of these principles are often called pure microkernel systems. Operating systems that follow the first principle only strict modularity and strong encapsulation but not the second, are sometimes called modified microkernel or macrokernel operating systems.

Advertisements
Categories: OS Internals, Tech, Windows
  1. Gaurav
    August 29, 2011 at 10:09 AM

    well, i have learnt on web that windows OS is monolithic kernel .
    is there an ambiguity over the issue ( further strengthen by the stmt that it is “modified microkernel)
    !!
    please clarify !

    • Mick
      August 31, 2011 at 7:09 AM

      Well, as mentioned in the post, it is very similar to a monolithic kernel, but it does not fit the classical definition of a monolithic kernel because it has some important features found typically in microkernels:

      * OS personalities running in user space as separate processes
      * Kernel-mode components don’t reach into one another’s data structures
      * Use formal interfaces to pass parameters and access and/or modify data structures

      The Windows kernel is designed to be modular (like a microkernel). Some more gory details can be found here:
      http://technet.microsoft.com/en-us/library/cc750820.aspx

      I’ll update the post with more detail.

  2. Marcus
    June 30, 2016 at 6:24 PM

    Windows is not even close to UNIX… it doesn’t support C, it doesn’t support POSIX, it doesn’t support the Single Unix Spec, etc. it’s completely it’s own design.

    Also, it’s a hybrid kernel. linux is a monolithic kernel, and MacOS is also a hybrid kernel, but much closer to being a microkernel than windows is.

    • Mick
      December 17, 2016 at 10:52 AM

      What do you mean Windows doesn’t support C ? Windows is written in primarily C, C++, and assembly, and C is a fully supported language for user mode and kernel mode development on Windows.

      Windows has had a POSIX subsystem since NT 3.5, which was released in 1994.
      https://www.wikiwand.com/en/Microsoft_POSIX_subsystem

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s