Does the program run a C / C ++ processor or kernel?

I have been programming for several years, but there is one thing that I never understood for sure:

There are 2 types of programming languages. Compiled and interpreted, while compiled must first be compiled for the interpreted language before they can be executed.

For example, C / C ++ must first be compiled into machine language before it can be executed.

And so my question is: who actually runs the compiled C / C ++ program for Windows / Linux? Is it directly interpreted by the processor or is it executed by the kernel of the OS and transfers commands to the CPU?

And if the processor executes it directly, how can the Windows kernel refuse some calls? Otherwise, does this mean that the kernel also understands machine language or does not compile non-core in C / C ++ to machine language?

+1
source share
1 answer

The program runs on a processor. The CPU has different privilege levels, the so-called "privileged instructions" can only be executed by the kernel - the way security is provided by the operating system.

+4
source

Source: https://habr.com/ru/post/1234212/


All Articles