Linux and Windows

A kernel is a fundamental component of an operating system (OS). It provides the design and architectural details made by developers associated with the particular operating system. Most of the people around the world use the computer without knowing how it actually functions and what is a kernel. The Kernel is the base of an operating system at the lowest level. The kernel is usually operated by the programmers or by the developers. The function of a Kernel practically is very important in all the operations. The Kernel is the heart of an operating system and without the Kernel, running an operating system is not possible. See difference between Linux and Windows.

RECOMMENDED: Linux Server vs Windows Server

Both Windows Kernel and Linux Kernel contain many similarities, the both control the low level system software and interactions with the computer’s hardware through Hardware Abstraction Layer (HAL). The Kernels can handle caching, device drivers, virtual memory, file systems, network protocols, system and termination calls. These Kernels are written in a high-level language known as C and the reason why they chose C is that it has been ported to all hardware platforms in existence. This would help them to save time, reduce the expense and intensity of the work when dealing with each new platform. Portability is important to programmers and software, usually if something is portable to different systems it means that there is less work and efforts as well ask expenses. The only thing is that the Kernel approach can vary for different systems. Yes they are similar but they work in a different ways for each system.

The Linux Kernel

The Linux Kernel is very similar to Unix operating system kernel. Linux kernel is used for servers and personal computers, usually it comes from a distribution. Linux kernel comes in distributions for diverse devices like tablets, smartphones and even smartwatches.

Linux Kernel was created in 1991 by Linus Torvalds, a Finnish computer science student. Since then Linux kernel expanded a lot, and now it supports a huge array of computer architectures.

Linux attracts a lot of developers, because it is open-source and you can do whatever you want with it. This is how distributions use it to create their own customized Linux operating systems

The Linux Kernel application programming interface (API) through which user programs interact with the kernel it is very stable and does not mess with other programs. Also drivers are controlling the hardware and are also stable. The only thing is the interface with is not very stable by design.

Linux Kernel Shell Application

The Linux Kernel refers to everything that  runs in Kernel mode and is made up of several distinct layers.  At the  lowest layer, the Kernel interacts with the hardware via the HAL.  At the  middle level, the UNIX Kernel is divided into 4 distinct areas.  The first  of the four areas handles character devices, raw and cooked TTY and terminal  handling.  The second area handles network device drivers, routing protocols  and sockets.  The third area handles disk device drivers, page and buffer  caches, file system, virtual memory, file naming and mapping.  The fourth  and last area handles process dispatching, scheduling, creation and  termination as well as signal handling.  Above all this we have the top  layer of the Kernel which includes system calls, interrupts and traps.  This  level serves as the interface to each of the lower level functions.  A  programmer uses the various system calls and interrupts to interact with the  features of the operating system.

The Windows Kernel or Kernel Mode

First Windows had the Windows 9x kernel architecture which was a monolithic kernel, where the basic code was similar to MS-DOS and it required MS-DOS to operate.

Windows 2000 NT

Then starting with Windows 2000, Windows started to use Windows NT kernel architecture which is included in Windows XP, Vista, 7, 8, 8.1 and Windows 10 too.

Basically Microsoft produces the Windows NT architecture line of Operating Systems and sell them, it’s not free like Linux. The Windows NT layers consists of to main components, user mode and kernel mode.

Also starting with Windows 2000, Microsoft began making 64-bit versions of Windows along with the 32-bit versions.

RECOMMENDED: How to Switch From 32-bit Windows 10 to 64-bit Windows 10

For Windows users the programs and subsystems are limited when in user mode. In the kernel mode user has unrestricted access to the system memory and external devices. The Windows NT kernel is a hybrid kernel which has a simple kernel and the HAL. Besides this, it has a big range of services which are named Executive and all of them are in kernel mode.

The Windows kernel from the Windows operating system is something a little more different from Linux kernel. As I said it has another approach which was developed in another way by the Microsoft. Microsoft Windows uses the “Kernel mode” to request things.

Windows Kernel vs Linux Kernel

Answering to the Windows Kernel vs Linux Kernel I can state that we have to look for the similarities first between Windows, Linux, FreeBSD and any other x86 operating system. From this we can conclude that that all of these operating systems are Intel x86 CPU based, the only one that can run on any other hardware is Linux.

Operating systems use “SYSENTER” and “SYSEXIT” system call to make a transition from ring 3 to ring 0, mostly known as x86 operating system. System call is almost identical for all x86 operating systems, also every OS has a per-CPU task queue for scheduling where are choosen which task to be excluded for the this type of CPU.

Also very CPU have its CR3 registers, and they can have different memory page tablets, and iti is common to have one page table in memory and share it among the different CPUs.

RECOMMENDED: How to Check Computer Specifications in Linux

The Difference

The difference between Linux Kernel and Windows Kernel mode is easy and simple explained. The Linux Kernel has all the access to the memory and can do whatever it wants with it. In order to keep himself alive it will start to kill other processes to acquire memory for him, if that will not happen, the system will crash.

Windows Kernel doesn’t do that. It just swaps out and in the kernel memory when there is not enough and because of this the implementation is more complex.

For Windows all graphics operations are don in Kernel windows, all graphics operations were done in the kernel for Windows 9x, for the new NT version Kernel this was shifted mainly for performance reason. Characteristics of graphics rendering are still a part of the OS core, as compared with Linux which is often used in servers. Web applications servers and supercomputers do tend to have more performance with no graphical interface. The graphical interface doesn’t matter as much as the performance. For Linux, in both X11 and Wayland architecture a large part of the rendering itself is done in userspace, but hardware like Nvidia or Intel graphics are still don in kernel. See the bellow diagram:

Linux Kernel Diagram

As you can see, everything outside the “linux kernel” area is in thee userspace, and the black area “GPU” is the physical hardware.

Now the Windows diagram where the Windows kernel has a “graphical subsystem” dedicated for graphics processing, see the diagram bellow:

windows kernel


As we can see, both Linux and Windows operating systems has a sort of Kernel. Both kernels are with a different approach but both performs similar functions. You can check the Wikipedia page for a comparison of all operating system kernels. Between Linux and Windows kernels, the difference is that Linux is more like a king cleaning everything on its way to get more memory when it needs. Also you can do almost everything with the Linux kernel, you have unlimited customization possibilities. Compared to the Windows kernel, you can not do too many things. Only a few functions and if taking it serious, only Microsoft developers and employers have access to it.

Leave a Reply