Can the kernel be written differently than in assembler?

I have never programmed a kernel. I am a good Java programmer and often use it. Now I feel like I'm doing something interesting with the cores. The kernel is between the hardware and the OS. It interacts with equipment using system calls. For each programming language, a compiler is required to compile code written in a high-level language, and then it generates low-level code, which is usually an assembly language code. Here, my doubt arises: if we have a core written in C, should we have a C compiler installed on the machine? In the end, when the kernel interacts with hardware, it uses assembly language, can I create a kernel in Java? If so, what are the requirements for the same? Thank.

+3
source share
2 answers

The kernel is between the hardware and the OS

Typically, the kernel is considered part of the operating system.

It interacts with hardware using system calls.

System calls are the interface provided by the OS for user applications. The operating system interacts with the equipment through other mechanisms (for example, interrupts or registers with memory mapping).

For each programming language, a compiler is required to compile code written in a high-level language, and then it generates low-level code, which is usually an assembly language code.

The compiler output is usually either native machine code or a language-specific bytecode (as in the case of Java). Sometimes compilers also target another programming language, such as C or Javascript (transpilation).

, , C, C, ?

. C , .

, ​​ ,

. .

​​ Java?

.

, ?

​​ Java,

, :

?

, . ? , . -, , -. (, , , ), ( : MRU , ), / ( XYZ ?),...

, , Java , C. .

+21

, ​​ Java, . JNode. , : , , C.

+1

All Articles