Skip to main content

Process

In Turkish
süreç
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/process

In short

A process is a running instance of a program, with its own memory space, resources, and at least one thread of execution managed by the operating system.

What is a process in computing?

A process is a program that is currently running. The program itself is just a file on disk; when you launch it, the operating system loads its code into memory and creates a process with a unique process ID (PID), its own private memory space, open file handles, and at least one thread that executes instructions.

The operating system keeps a record for each process, often called a process control block, that stores its state (running, ready, waiting, or terminated), saved CPU register values, and memory mappings. Processes are isolated from each other, so one crashing process normally cannot corrupt another's memory. When processes need to cooperate, they use inter-process communication (IPC) mechanisms such as pipes, sockets, or shared memory.

A useful analogy: a program is a recipe, and a process is a cook actually preparing that recipe in a kitchen. Several cooks can follow the same recipe at once, just as you can open several windows of the same app, each running as its own process. Browsers, web servers, and databases often run many processes to isolate work and use multiple CPU cores.

A process is often confused with a thread. A process is the container that owns memory and resources, while a thread is a path of execution inside a process; threads in the same process share memory, but separate processes do not. Creating a new process is also more expensive than creating a new thread.

At a glance

Two processes side by side: process A has its own memory space, shared by its three threads; process B has a separate memory space and one thread; the two can only talk through IPC.Process APID 4012Process BPID 4013Memory spacecode, data, open files · shared by its threadsThread 1own stackThread 2own stackThread 3own stackMemory spaceonly B'sThread 1own stackIPC
Threads in one process share its memory. Separate processes are isolated, so they cooperate through IPC such as pipes or sockets.

Key takeaways

  • A process is a program in execution, identified by a process ID (PID).
  • Each process has its own isolated memory space and resources.
  • A process contains one or more threads that run its code.
  • Processes communicate through IPC mechanisms such as pipes, sockets, and shared memory.
  • The operating system schedules processes onto the available CPU cores.

Example

Working with processes in a Unix shellbash
# Show the PID of the current shell
echo $$

# Start a background process and print its PID
sleep 60 &
echo "Started process $!"

# List running processes and filter for sleep
ps aux | grep sleep

# Ask the background process to terminate
kill $!

Readers ask

What is the difference between a program and a process?

A program is a passive file of instructions stored on disk. A process is an active, running instance of that program, with its own memory, state, and process ID.

What is the difference between a process and a thread?

A process is an independent running program with its own memory space, while a thread is a unit of execution inside a process. Threads of the same process share memory, which makes them lighter but requires careful synchronization.

What is a zombie process?

A zombie process has finished running but still has an entry in the process table because its parent has not yet read its exit status. It uses no CPU and disappears once the parent collects that status.

Often compared

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings