Skip to main content
Removed repeated "each". Improved punctuation marks.
Source Link

I know that when the source code, in say C++, is compiled.., the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile some simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly executed from memory (once the code is loaded into memory by the OS) or will each each command in the machine code still need to go through the OS (kernel) to be executed?

I have read a similar question. It did not explain if the machine code that is generated after compilation is an instruction to the CPU directly or if it will need to again go through the kernel to create the correct instruction for the CPU. I.e., what happens after the machine code is loaded into memory? Will it go through the kernel or directly talk to the processor?

I know that when the source code, in say C++, is compiled.. the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile some simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly executed from memory (once the code is loaded into memory by the OS) or will each each command in the machine code still need to go through the OS (kernel) to be executed?

I have read a similar question. It did not explain if the machine code that is generated after compilation is an instruction to the CPU directly or if it will need to again go through the kernel to create the correct instruction for the CPU. I.e., what happens after the machine code is loaded into memory? Will it go through the kernel or directly talk to the processor?

I know that when the source code, in say C++, is compiled, the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile some simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly executed from memory (once the code is loaded into memory by the OS) or will each command in the machine code still need to go through the OS (kernel) to be executed?

I have read a similar question. It did not explain if the machine code that is generated after compilation is an instruction to the CPU directly or if it will need to again go through the kernel to create the correct instruction for the CPU. I.e., what happens after the machine code is loaded into memory? Will it go through the kernel or directly talk to the processor?

Would aan executable need aan OS kernel to run?

I know that when the source code, in say c++C++, is compiled..the the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on Kernelskernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile asome simple source code, say with just a printf()printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly be executed from the memory (once the code is loaded into the memory by the OS) or will each each command in the machine code still need to go through the OS  (kernel) to be executed?

I have read a similar question. Did itIt did not explain if the machine code that is generated after compilation is an instruction to the CPU directly or willif it will need to again go through the kernel to create the correct instruction for the CPU? i. I.e What., what happens after the machine code is loaded on to theinto memory? Will it go through the kernel or directly talk to the processor.?

Would a executable need a OS kernel to run?

I know that when the source code, in say c++, is compiled..the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on Kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile a simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly be executed from the memory (once the code is loaded into the memory by OS) or will each each command in the machine code still need to go through the OS(kernel) to be executed?

I have read a similar question. Did it not explain if the machine code that is generated after compilation is an instruction to the CPU directly or will it need to again go through the kernel to create the correct instruction for the CPU? i.e What happens after the machine code loaded on to the memory? Will it go through the kernel or directly talk to the processor.

Would an executable need an OS kernel to run?

I know that when the source code, in say C++, is compiled.. the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile some simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly executed from memory (once the code is loaded into memory by the OS) or will each each command in the machine code still need to go through the OS  (kernel) to be executed?

I have read a similar question. It did not explain if the machine code that is generated after compilation is an instruction to the CPU directly or if it will need to again go through the kernel to create the correct instruction for the CPU. I.e., what happens after the machine code is loaded into memory? Will it go through the kernel or directly talk to the processor?

Tweeted twitter.com/super_user/status/1022950086035292163
Fix link
Source Link
gronostaj
  • 57.5k
  • 21
  • 129
  • 185

I know that when the source code, in say c++, is compiled..the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on Kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile a simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly be executed from the memory (once the code is loaded into the memory by OS) or will each each command in the machine code still need to go through the OS(kernel) to be executed?

I have read a similar question here: stackoverflowa similar question.com/questions/1599434/ … Did it not explain if the machine code that is generated after compilation is an instruction to the CPU directly or will it need to again go through the kernel to create the correct instruction for the CPU? i.e What happens after the machine code loaded on to the memory? Will it go through the kernel or directly talk to the processor.

I know that when the source code, in say c++, is compiled..the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on Kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile a simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly be executed from the memory (once the code is loaded into the memory by OS) or will each each command in the machine code still need to go through the OS(kernel) to be executed?

I have read a similar question here: stackoverflow.com/questions/1599434/ … Did it not explain if the machine code that is generated after compilation is an instruction to the CPU directly or will it need to again go through the kernel to create the correct instruction for the CPU? i.e What happens after the machine code loaded on to the memory? Will it go through the kernel or directly talk to the processor.

I know that when the source code, in say c++, is compiled..the output from the compiler is the machine code (executable) which I thought were instructions to the CPU directly. Recently I was reading up on Kernels and I found out that programs cannot access the hardware directly but have to go through the kernel.

So when we compile a simple source code, say with just a printf() function, and the compilation produces the executable machine code, will each instruction in this machine code be directly be executed from the memory (once the code is loaded into the memory by OS) or will each each command in the machine code still need to go through the OS(kernel) to be executed?

I have read a similar question. Did it not explain if the machine code that is generated after compilation is an instruction to the CPU directly or will it need to again go through the kernel to create the correct instruction for the CPU? i.e What happens after the machine code loaded on to the memory? Will it go through the kernel or directly talk to the processor.

added 1 character in body
Source Link
GRANZER
  • 703
  • 1
  • 5
  • 8
Loading
Source Link
GRANZER
  • 703
  • 1
  • 5
  • 8
Loading