Active3 months ago
What are the differences between a Program, an Executable, and a Process?
In computing, executable code or an executable file or executable program, sometimes simply referred to as an executable or binary, causes a computer 'to perform indicated tasks according to encoded instructions,' as opposed to a data file that must be parsed by a program to be meaningful.
Josnidhin9,32588 gold badges3232 silver badges5757 bronze badges
Mohammad OlfatmiriMohammad Olfatmiri- Program executable files types are special file formats or text scripts, which computer operating system are able to directly execute. Executable files are non-readable, commonly in binary format and are created (compiled) from source code file and passed through compiler or assembler.
- Computer files with an '.exe' extension are called executables, or EXE files. This type of file is one of the most ubiquitous in the Windows operating system, where it is used to install or run software applications.
- The tutorial below will help you find the original files of a program including the executable or exe files. Location of EXE files can vary but are mostly in the same place. Note: BAT and COM are also different types of executable file extensions in Microsoft Windows, but in this tutorial, we are only going to focus on EXE.
56422 gold badges1818 silver badges4646 bronze badges
10 Answers
In simple words -
Program: Program is a set of instructions which is in human readable format.(HelloWorld.c)
Executable: Executable is a compiled form of a Program (HelloWorld.exe file)
Process: Process is the executable being run by OS. The one you see in Task Manager or Task List (HelloWord.exe Process when we double click it.)
Parag MeshramProgram To Open Unix Executable File On Mac
Parag Meshram5,49666 gold badges4444 silver badges8181 bronze badges
A Program or Computer Program essentially provides a sequence instructions (or algorithms if you rather) to the operating system or computer. These computer programs come in an executable form that the Operating System recognizes and can use to directly execute the instructions.
Essentially, an Executable is a file in a format that the computer can directly execute as opposed to source files which cannot be directly executed and must first be compiled. An executable is the result of a compilation. I mentioned that the operating system recognizes executable, it does so via the extension. Download whatsapp for android apk. A common extension used for windows executable files is .exe.
Once an executable has been executed a process begins. A process is simply an instance of a computer program. You can think of a process as the execution of the instructions contained in a computer program. When you view the Task Manager on a Windows computer you can see all of the current processes. Processes own resources such as virtual memory, operating system descriptions (handles, data sources, sinks etc), security attributes and various other elements required to process effectively.
Caster TroyCaster Troy1,67322 gold badges1818 silver badges4242 bronze badges
A process is basically a program in execution. Associated with each process is its address space, a list of memory locations from 0 to some maximum, which the process can read and write. The address space contains the executable program, the program’s data, and its stack. Also associated with each process is a set of resources, commonly including registers (including the program counter and stack pointer), a list of open files, out- standing alarms, lists of related processes, and all the other information needed to run the program. A process is fundamentally a container that holds all the information needed to run a program, which is a set of instructions defined by a user/developer.
vjpandianvjpandian
A program is a set of instruction and a passive entity.Program is a part of process while a process is running state of the program and it is a unit of work in a system.
Naveen PuriNaveen Puri
Program: It is a passive entity, like the contents of a file stored on the Hard disk. In other words, It is just like another text file on your disk. Mostly, it will be in human readable format (ex: .java file).
Executable: It is again a passive entity. It is just another file on the disk which is derived by compiling the Program. So, it is a machine readable version of the Program file (ex: .class file.). Please note that it is still sitting out there on disk with not being executed currently.
Process: It is the active part of the Program/Executable. A Program/Executable loaded into memory(RAM) and executing is called as Process. A Process consists of set of instructions. CPU executes these instructions one by one.(ex: JVM loads your .class file and gives instructions to the CPU).
Also you can have two processes executing the same Program/Executable.
Also you can have two processes executing the same Program/Executable.
ManoharManohar
A program is a collection of source files in some high level language that you write to do somefunction, for example, C++ files that implement sorting lists. An executable is the file that the compilercreates from these source files containing machine instructs that can execute on the CPU. A process is theactive execution of the executable on the CPU and in the memory. It includes the memory managementinformation, the current PC, SP, HP, registers, etc.
Mohammad OlfatmiriMohammad Olfatmiri56422 gold badges1818 silver badges4646 bronze badges
Process is a part of a program. Process is the part where logic of that particular program exsists.Program is given as a set of process. In some cases we may divide a problem into number of parts. At these times we write a seperate logic for each part known as process.
simran jeetsimran jeet
Consider it like this.
A program is a blueprint. Like a blueprint for a building. There is no building, but an abstraction of how a building would look like.
Process is the actual construction of Building which is built according to the blueprint.
While constructing a Building, there are many things happening at the same time. You are preparing the concrete, building multiple rooms at the same time, Laying the electrical cables etc. These would be Threads.
Akshayraj KoreAkshayraj Kore
Boris StitnickyBoris Stitnicky10.1k44 gold badges4646 silver badges6565 bronze badges
- Program is a static entity but process is a dinamic entity.
- Program is nothing but the contained in a file.Where process is a program in execution.
3.Program does not use the CPU resister set but process use the CPU resister set to store the intermediate and final result.
Susmita SahaSusmita Saha
Not the answer you're looking for? Browse other questions tagged unixoperating-system or ask your own question.
Program execution |
---|
General concepts |
|
Types of code |
Compilation strategies |
|
Notable runtimes |
|
Notable compilers & toolchains |
|
A hex dump of an executable real mode loader
In computing, executable code or an executable file or executable program, sometimes simply referred to as an executable, causes a computer 'to perform indicated tasks according to encoded instructions',[1] as opposed to a data file that must be parsed by a program to be meaningful.
The exact interpretation depends upon the use. 'Instructions' is traditionally taken to mean machine code instructions for a physical CPU,[2] in some contexts a file containing bytecode or scripting language instructions may also be considered executable.
Generation of executable files[edit]
Executable files can be hand-coded in machine language, although it is far more convenient to develop software as source code in a high-level language that can be easily understood by humans. In some cases, source code might be specified in assembly language instead, which remains human-readable while being closely associated with machine code instructions. The high-level language is compiled into either an executable machine code file or a non-executable machine-code object file of some sort; the equivalent process on assembly language source code is called assembly. Several object files are linked to create the executable. Object files -- executable or not -- are typically in a container format, such as Executable and Linkable Format (ELF).[3] This structures the generated machine code, for example dividing it into sections such as the .text (executable code), .data (static variables), and .rodata (static constants).
In order to be executed by the system (such as an operating system, firmware, or boot loader), an executable file must conform to the system's application binary interface (ABI).[4] Most simply a file is executed by loading the file into memory and simply jumping to the start of the address space and executing from there, but in more complicated interfaces executable files have additional metadata, specifying a separate entry point. For example, in ELF, the entry point is specified in the header in the
e_entry
field, which specifies the (virtual) memory address at which to start execution. In the GCC (GNU Compiler Collection) this field is set by the linker based on the _start
symbol.Executable files typically also include a runtime system, which implements runtime language features (such as task scheduling, exception handling, calling static constructors and destructors, etc.) and interactions with the operating system, notably passing arguments, environment, and returning an exit status, together with other startup and shutdown features such as releasing resources like file handles. For C, this is done by linking in the crt0 object, which contains the actual entry point and does setup and shutdown by calling the runtime library.[5]
Executable files thus normally contain significant additional machine code beyond that directly generated from the specific source code. In some cases it is desirable to omit this, for example for embedded systems development or simply to understand how compilation, linking, and loading work. In C this can be done by omitting the usual runtime, and instead explicitly specifying a linker script, which generates the entry point and handles startup and shutdown, such as calling
main
to start and returning exit status to kernel at end.[6]See also[edit]
References[edit]
- ^'executable'. Merriam-Webster's Online Dictionary. Merriam-Webster. Retrieved 2008-07-19.
- ^'Machine Instructions'. GeeksforGeeks. 2015-11-03. Retrieved 2019-09-18.
- ^'Chapter 4: Object Files'. refspecs.linuxbase.org. Retrieved 2019-09-18.
- ^Boelen, Michael (2019-05-15). 'The 101 of ELF files on Linux: Understanding and Analysis - Linux..'Linux Audit. Retrieved 2019-09-18.
- ^content, Tim Fisher Tim Fisher has 30+ years' professional technology support experience He writes troubleshooting; Lifewire, is the General Manager of. 'List of Executable File Extensions'. Lifewire. Retrieved 2019-09-18.
- ^McKellar, Jessica (Mar 16, 2010). 'Hello from a libc-free world! (Part 1)'.
External links[edit]
- EXE File Format at What Is
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Executable&oldid=918607127'