What is the language used to write operating systems (Windows) or a boot CD?
Boot loaders are usually written in Assembly, as well as low-level kernel parts, like hardware drivers.
The kernel itself can be written in different languages, like Assembly, C or C++.
Maybe you want to look into the Singularity Project.
Its from Microsoft Reseach, on how today a OS could be built.
there you find a lot of papers, on the concepts of building an OS.
I just know Unix and Linux are written in C for sure, but Windows. Can anybody tell me this also?
Well, the question is also "What is the operating system?" (does bundled Internet Explorer count in?), but otherwise I believe Windows is mostly C and C++.
I'm pretty sure the earliest versions of Windows were written primarily in Pascal. That's why you can still find references to pascal calling conventions in old documents and header files, though AFAIK those conventions only ever applied to 16 bit Windows.
These days, Windows is probably written in a mixture of languages, though with the emphasis strongly on C and C++. For example, some parts of .NET are probably written in C#, and these days that easily counts as an O/S component.
Similarly, I'll bet there are at least a few Objective C components in modern versions of the Mac O/S.
There are a lot of languages that are somewhat suited to writing operating systems. In niche areas, I'm certain you'll find Ada, Modula 2 and more.
Imperative languages without garbage collection are probably most common because of the relative ease of interfacing to hardware and assembler code. However, most functional languages are impure. There are low-level versions of Lisp around, if you look hard enough. And ML-family languages and Haskell have probably been used in operating systems, at least for research/academic purposes.
In fact, I wouldn't be surprised to find even a bit of Prolog in some operating systems components - and certainly some code written using custom-made domain specific languages.
A real-world operating system is usually a very large software system. Even embedded operating systems have a fair bit of complexity, e.g. for options you don't need for your hardware but someone else does. I've never worked on one, but I'll bet that to get that working, the developers are primarily pragmatists - using whatever they have that works to get the job done.
Operating Systems can be written in pretty much any language, and there are plenty of Operating Systems written in an whole bunch of languages. Just a couple of examples:
- Singularity is written in Sing# which is a superset of Spec#, which in turn is a superset of C#
- House is written in Haskell
- all of the Lisp OS's are written in Lisp
- there are several Smalltalk OSs written in Smalltalk
- many embeddded OSs are written in Forth
- SharpOS and Cosmos are written in C#
- NewOS and JNode are written in Java
- Ununumium used to be written largely in Python, but now they have shifted their focus, it is written largely in assembly
- You can argue whether JS/UX is an OS or not, but it is written in JavaScript
- Modula-2 was explicitly invented for the purpose of writing an OS
- Oberon also was explicitly invented for OS development
- the original MacOS was written in Pascal
- the original OS/400 was written in Modula-2 and PL/MI
- Eleanor McHugh has some preliminary ideas for writing an OS in Ruby
- the Windows NT kernel is written largely in C, however the farther away you get from the kernel, there might be some C++ or even C# in there