Which programming language is used for making Windows 10?

https://www.quora.com/Which-programming-language-is-used-for-making-Windows-10/answer/Axel-Rietschin?share=1

Windows 10 is the same (evolved) code base as the code base of Windows 8.x, 7, Vista, XP, 2000, and NT, where each generation saw significant refactoring, and added substantial new features, improved performance and hardware support as well as security, all while maintaining a very high degree of backward compatibility.

Most of the kernel (ntoskrnl.exe) is written in the C programming language. You can find leaked copies of the Windows Research Kernel even on Github[1] and see for yourself: although quite dated and largely incomplete, this code should give significant insights.

See for example the source code that implements the familiar Registry, a kernel component known internally as the configuration manager, “Cm”, in wrk-v1.2/base/ntos/config.

Most of what runs in kernel mode is also written in the C programming language (most file systems, networking, most drivers…) with some C++ here and there.

As you go up the stack towards user mode, and towards more recent developments, you’ll find somewhat less C and somewhat more C++.

As a side note, what most people don’t realize is the sheer size of Windows: this is a gigantic project of truly epic proportions.

The full source tree with all the code, test code and everything that together constitutes the “Windows source code” is more than a half terabyte in size, in more than 4 million files. You can spend a year (seriously) just drilling down the source tree, more than a half million folders containing the code for every component making up the OS workstation and server products and all their editions, tools, and associated developement kits, and see what’s in there, read the file names and try to figure out what does what. It would take a life (or two) to read it all.

Below is a screenshot which may or may not depict statistics about a full Windows enlistment (source code, test files, build tools, everything)

One one occasion, I left a Git branch stall for a few weeks and, when I got back to it, it was behind by almost 60,000 commits. I think one can argue that a single person cannot possibly read all the code that is added to Windows every day, let alone read what was written during the past thirty years!

Back to our topic, if you look at a Windows 10 “DVD” and consider what programming languages were used to create everything that’s on that disk, my guess is that 98% of it would be C and C++, with C getting the lion’s share.

The .NET BCL and other managed libraries & frameworks that ship inbox are typically written in C#, but they only represent tiny drops in a giant sea of C code with a few islands of C++. They also come from a different division (the developper’s division, DevDiv) and their code is not part of the Windows source tree.

Footnotes

[1] markjandrews/wrk-v1.2

Leave a Reply

Your email address will not be published. Required fields are marked *

Next Post

Lyft vs Uber: A Tale of Two S-1s

Sun Apr 14 , 2019
https://benjamintseng.com/2019/04/lyft-vs-uber-a-tale-of-two-s-1s/

You May Like