I get that C and its super sets allow you to have low level access, but could you use a different language. For example Visual Basic, C# or even Java? I was just curious because it seems like something better should have come along since C's inception.
Most of the operating systems are written in the C/C++ languages. These not only include Windows or Linux (the Linux kernel is almost entirely written in C), but also Google Chrome OS, RIM Blackberry OS 4.
C is the programming language most commonly used and recommended for writing operating systems. For this reason, we are going to recommend learning and using C for OS development. However, other languages such as C++ and Python can also be used.
Writing bits and pieces in inline asm is simple in C and C++. Also, most other languages support C's calling convention, so writing your OS in C makes it easy to expose system calls to user-space in a way that can be easily interacted with.
Easy to code: One of the biggest reasons why C works so well for systems programming is because it is easy to code. C's direct 1-1 interaction with machine code means there are no complicated built-in data structures like trees or tables.
You can write an operating system in any language you choose - provided you have the bootstrapping required to compile it onto that platform.
For example, JNode is a Java based OS (with a small amount of assembler).
You could use any of those to write the operating system. However, you would need a bootstrap (probably written in C) to load and run the runtime for your language.
Google Scholar shows some good starting points for research: http://scholar.google.com/scholar?q=java+operating+system&hl=en&btnG=Search&as_sdt=1,5&as_sdtp=on
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With