Reputation: 167
This question may sound stupid but i couldn't find a real answer so here it is:
In what programming language are OSs programmed?
In what language is OpenBSD programmed?
Can you programm and operating in every scripting language (Ruby, Python,...etc)?
Upvotes: 0
Views: 373
Reputation: 2757
Most operating systems are programmed in C. Some parts of some operating systems may use C++ or Objective C as well. Also, operating systems must have some assembly in them.
Although you can theoretically program parts of an OS in a scripting language, it would not be so easy. At least some of the OS would need to be compiled to native code. However, the operating system might have a built in interpreter for a scripting language or virtual machine for bytecode. Then you could write, for example, device drivers in the scripting language, where the driver presents a certain interface to the OS. You could also maybe write scheduling policies, paging systems, etc. in the scripting language. Basically your scripting language would provide a nice way to quickly prototype and test new modules and OS concepts. However, I wouldn't recommend such a system for production environment because you usually take a performance hit with the types of languages that you mention.
I am not aware of any operating system that uses anything like this. I am vaguely aware that some research OSes have been developed that used similar ideas, though I can't name any off the top of my head.
Upvotes: 3