Newbie Question - What is actually executing the binary?

Peter Smith pasmith at wbmpl.com.au
Sun Jun 6 03:07:40 UTC 2004


Hello there,

I, too, am a linux newbie, but I have been playing with computers for over
40 years ...

When you type "ls -l", the shell program looks for the "ls" file where it
expects programs to be found, and sends the address of the file to the
kernel - which is the program which deals with the hardware.

A kernel process then copies the "ls" binary file into memory, sets the
starting address of "ls" in the CPU instruction register, and says "go".

>From then on, the hardware progressively loads the instructions into the CPU
and executes them.

So, the answer to your question is that there is no software executing a
compiled program - it is set up by the compiler to be executed by the
hardware directly.

This is not true, of course, for "interpreted" programs like pearl, python,
basic or shell scripts.  They are converted to machine instructions on the
run by the pearl, python, etc. interpreters.

I hope this is the answer you were looking for.

Regards,
Peter

-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com]On Behalf Of snodx at hotmail.com
Sent: Sunday, 6 June 2004 11:51 AM
To: redhat-list at redhat.com
Subject: Newbie Question - What is actually executing the binary?


Hi list,

I am a newbie here (totally new to Information Technology) you could
say.

I have studied a bit about Linux, but I am not getting the awnser to
this question, infact you could say that all the keyword combinations
I have tried so far in Google are not yielding any results.

Here is the question, any thing that I type on Redhat's command terminal,
where is the command terminal actually sending it to? For eg if I
type say "ls -l" what is actually executing the "ls" binary in the
back-end? Which is the software program that is opening the "ls"
binary executable file, traversing through the binary instructions
in this file, understanding it and executing it?

What I am getting out of Linux books is that there is a shell which is
interacting with the user and there is the kernel which is actually
executing the instructions but I want to know more. Which kernel
program is recieving the instructions from the shell?

Sorry for this dumb question. I did'nt where else to post it.

SNODX



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list





More information about the redhat-list mailing list