Why C is used in the implementation of OS?


#1

Why C is used in implementation of OS even though it's not as
secure as C++ and JAVA?


#2

There are many reasons why C is chosen for OS work. C is close to the machine, and it’s very easy to write a decent compiler for a new platform. C is well known and is very simple; there are many C programmers out there.

Why not other languages? There are operating systems in other languages: in Assembly language, in Haskell (House), in Java (JavaOS). I am sure that writing in C++ is no different from writing in C. I bet that most major languages can be used to write an operating system, granted they can interact with platform dependent assembly code.

However, the most important reason to use C is performance and discipline. C helps you acquire both.


#3

Some of the key features that makes C good for implementation of Operating System are as follows:
-> C provides high level constructs as well as low level functionalities because it is a middle level language, it offers benefits both for the end user and hardware respectively.
-> The programmer is solely responsible for the memory management it hence we can infer that it provides direct memory access.
-> The only run-time dependency is calling the main function.