+ 3
What is a good code language to make an operating system
11 Answers
- 3
C++ is the best language for making an OS.
+ 7
@Abhishek, that is a relatively biased response. There is no "good language" for making an operating system. Operating systems incorporate multiple languages, just like Windows, Linux, and Mac; they all use multiple languages.
+ 7
UNIX and Windows NT are built upon Assembler and C. Not C++.
+ 6
It is possible to write an operating system without any Assembly code in any language where the compiler generates binary. There are places that some Assembly code would help improve the speed, but most compilers generate binary better than a lot of people can.
I've modified operating system source written in C, C++, and Modula II. I've written embedded systems in Pascal, C, and C++ (embedded is a subset of a real operating system lacking multi-user support and other things not required for the system.) Some of those had Assembly, but my last embedded C++ did not need any and could have become a multi-user operating system just by adding user accounts and privileges.
+ 5
I agree with@Jonathan.. we use multiple languages for making Operating Systems like Windows and Linux. Not just C++ ! ..
+ 3
Thanks
+ 2
Thanks
+ 2
To actually answer the question..
There are many good languages to use when building an operating system. Personally I find C/C++ most useful but for the deeper bits such as the kernel a little bit of assembly will be needed but most of it can be done in pretty much any programming language that compiles to machine code.
After the lower components such as the bootloader and kernel the "user land" components such as general system utilities could even be written in an interpreted language if you wanted but it isn't recommended.
So in my opinion a good choice of languages to use would be first: C++ because it is C just with some additions and changes so you get the best of both worlds and secondly: Assembly because it will be required in a few places and also because it can provide very low-level control in places such as the kernel and device drivers which is very helpful.
+ 2
It NEEDS to be a fast language. Most operating systems are written mainly in C++, and Linux is written in C. Some knowledge of Assembly would also be very helpful.
+ 2
For something like a kernel, C and some assembly would be used. For most of the operating system you would use C++ or Java in the case of Android (But please don't use Java).
- 7
plz upvote if you like my answer..