首页 > 试题广场 >

What are the advantages and di

[问答题]

What are the advantages and disadvantages of writing an operating system in a high-level language,such as C?

推荐

Answer:There are many advantages to writing an operating system in a high-level language such as C.First,by programming at a higher abstraction,the number of programming errors is reduced as the code becomes more compact.Second,many high-level languages provide advanced features such as bounds-checking that further minimize programming errors and security loopholes.Also,high-level programming languages have powerful programming environments that include tools such as debuggers and performance profilers that could be handy for developing code.The disadvantage with using a high-level language is that the programmer is distanced from the underlying machine which could cause a few problems.First,there could be

a performance overhead introduced by the compiler and runtime system used for the high-level language.Second,certain operations and instructions that are available at the machine-level might not be acces-sible from the language level,thereby limiting some of the functionality

available to the programmer.


发表于 2018-05-05 21:04:00 回复(0)