Answer the question
In order to leave comments, you need to log in
What executes executable files?
Hello. Now I was sitting thinking something, and came across a question in my head, for the answer to which I immediately ran to the toaster because I don’t know how to formulate it correctly. Actually what executes executable files? There is for example xml. This is essentially a set of letters, and only programs that are actually able to understand and work with xml can read and execute it. The same for example with pdf. The music player does not understand the pdf file format, so it will not be able to execute it. Music player that plays music. files, a notepad (editor, IDE) that reads xml and stuff like that, these are programs. And what executes and reads ELF, Mach-O, PE and other formats of executable files, is there some kind of system software that does this, or do I not understand correctly and the loading of executable files is done wrong?
Answer the question
In order to leave comments, you need to log in
It depends on which files, and which operating system. Because if we are talking about super mario in the NES emulator, or command.com in Windows 95, or ELF files somewhere in Linux , then the mechanisms will be somewhat different.
If you are interested in the whole topic in general, then indeed, you can start with Tanenbaum. Or search for details on a specific file type that interests you.
The executable file is usually executed by the CPU. in the event that the code of the executable file is intended not to be executed on the processor, but in a virtual machine, then the code of the executable file is executed by the virtual machine.
not so naturally
the operating system knows the format of the executable file
at startup, the operating system projects the file into RAM (using the page exchange mechanism) and transfers control to it
Actually what executes executable files?CPU. There is such an abstract entity as a process. There is a thread in the process context. One or more. An executable file can be thought of as a process. And one of the parts of the process (thread) is executed on the processor.
There is for example xml. This is essentially a set of letters, and only programs that are actually able to understand and work with xml can read and execute it.This is a set of some symbols for the convenience of perception. In fact, a dump of zeros and ones.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question