What are the differences between Program, Executable, and Process?

What are the differences between Program, Executable, and Process?

+6
source share
10 answers

In simple words -

Program: A program is a set of instructions that are read in human format (HelloWorld.c)

Executable file: The executable file is a compiled program form (file HelloWorld.exe)

Process: A process is an executable file executed by the OS. The one that you see in the task manager or task list (the HelloWord.exe process when you double-click on it).

+9
source

A program or computer program essentially provides sequence instructions (or algorithms, if you like) 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 instructions.

Essentially, an Executable is a file in a format that a computer can execute directly, unlike source files that cannot be executed directly, and must be compiled first. The executable file is the result of compilation. I mentioned that the operating system recognizes the executable file, it does this through the extension. The common extension used for Windows executables is -.exe.

After executing the executable file, the process begins. A process is simply an instance of a computer program. You can think of the process as following the instructions contained in a computer program. When you view the Task Manager on a computer running Windows, you can see all the current processes. It processes its own resources, such as virtual memory, descriptions of the operating system (pens, data sources, sinks, etc.), security attributes and various other elements necessary for effective processing.

+7
source

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 that the process can read and write. The address space contains an executable program, program data and its stack. Also, each process is associated with a set of resources, usually including registers (including program counter and stack pointer), a list of open files, outstanding alarms, lists of related processes and all other information necessary to start a program. A process is basically a container containing all information necessary to run the program , which is a set of instructions defined by the user / developer .

+1
source

A program is a set of commands and a passive object. A program is part of a process, while a process executes a program state and is a unit of work in the system.

+1
source

Program: This is a passive entity, like the contents of a file stored on a hard drive. In other words, it is like another text file on your disk. Basically it will be in a human-readable format (for example, a .java file).

Executable file: This is again a passive entity. This is just another file on disk that is created by compiling the program. Thus, this is a machine-readable version of the Program file (for example, a .class. File). Please note that it is still on disk, and currently it is not running.

Process: This is the active part of the program / executable. A program / executable file loaded into memory (RAM) and executed is called Process. A process consists of a set of instructions. The CPU executes these instructions one after another (for example, the JVM downloads your .class file and gives instructions for the CPU).
You can also have two processes running the same program / executable.

+1
source

A program is a set of source files in some high-level languages ​​that you write to make some, for example, C ++ files that implement sort lists. An executable file is a file that the compiler creates from these source files containing machine instructions that can be executed on the processor. A process is the active execution of an executable file on the CPU and in memory. It includes memory management information, current PC, SP, HP, registers, etc.

0
source

The process is part of the program. A process is that part in which the logic of this particular program exists. A program is provided as a set of processes. In some cases, we can divide the problem into the number of parts. At this time, we write separate logic for each part known as a process.

0
source

Think of it this way.

A program is a project. Like a floor plan. There is no building, but an abstraction of how the building will look.

A process is the actual structure of a building that is built according to plan.

During the construction of a building, many things happen simultaneously. You prepare concrete, simultaneously build several rooms, lay electric cables, etc. It will be streams.

0
source

No difference. Remember that there is no spoon.

-4
source
  • A program is a static object, but a process is a dynamic object.

  • A program is nothing more than that contained in a file. Where the process is an executable program.

3. The program does not use a set of CPU resistors, but the process uses the CPU settings to save the intermediate and final result.

-4
source

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


All Articles