What language is used to program an operating system?

5

What language do you use in programming an OS?

    
asked by anonymous 18.03.2016 / 17:57

3 answers

10

Essentially anyone you want. In a way, it is possible to write an unconventional operating system even with JS, although it is a bad language for this and there will be strong limitations. There are already OSes written in Moon (# and here ).

Some were written in C #: ( Singularity , COSMOS , SharpOS , Midori ). Other in Java . Any language can be used to write an OS. I could go out by listing OSes in virtually every mainstream and even niche language. This can be read here .

Programming languages have the ability to perform any task. Your implementations may somewhat limit what they can access on the hardware where they will run.

Of course some languages are more suitable. So C is very used to it. C ++ has also been used with increasing success. Assembly dominated this type of development for a long time and there are still cases like this.

Windows is essentially written in C (I will not post here for obvious reasons, but the internet "makes" the sources of an older version of it). Many APIs and extra services are written or adapted for C ++. Of course you have some small parts in Assembly, it is difficult that there is not at least a small part of an OS that is not. Aggregate software may eventually be written in other languages, but I doubt they can be considered parts of the OS.

Further Reading:

18.03.2016 / 18:16
3

In the case of Windows is C, C ++, C #, and some things in Microsoft's own assembly. Linux just pick up the distribution code on the internet and look. Most use a lot of C, C ++, and assembly for things that need to be very optimized.

    
18.03.2016 / 18:08
0

Currently "production" operating systems are written in C.

    
01.09.2016 / 14:11