First of all, when we say
Since early era C programming language came around 1972 and Java Came in 1995
and is a direct descendant of C. But since early era people prefer C rather
than Java. Even today all the main stream OS like Windows, mac and Linux use C
kernel is in C.
uses (Objective C) and kernel is in C
Most part of Linux including its kernel is in C.
When it comes to writing
an OS, we need a language to directly interact with the hardware. OS needs to
care about all the low-level details like interfacing with your hardware or
managing memory. Languages running in VMs like Java do not offer such
functionality Using them does not make any sense from a language point of view.
But when it comes to C it provides Both interfacing and memory management and
C is a very simple and
portable language and became very popular even in its early days because of its
portability. C has been ported to a very wide range of CPU architectures and
the reason is that the first thing most CPU designers do now a day’s is port “C”
to the new CPU architecture. C has so widely spread that it has a great deal of
influence on the design of the CPU instruction set itself. Thus, making it an
Ideal choice for any one looking to design a new OS
C has no need for supporting
heap memory management we can provide our own heap memory management for simple
and enormous fixed sized array. Java needs heap management as part of the
run-time support thus making C a much better option for designing an OS.
C programming language can
be separated from its libraries and does not really require a runtime
environment. Other than the fact that your CPU is missing things such as
multiplication or division, stack operations, etc. Floating point math isn’t
really needed by most of the OSes thus making it Ideal for designing OS but if
floating point math is required as part of the Operating System than runtime
support may be needed
Copyright 2019 - Education WordPress Theme.