Process
Also known as: running program
A program while it is running, with its own space in memory and the rights of the account that started it.
Draft - this entry has not been reviewed yet.
Formal
A running instance of a program, which the operating system gives its own private memory, a share of the machine's time, and the identity and permissions of the account it runs as.
In plain English
A recipe is the program; actually cooking it in a kitchen, with your own pots and ingredients, is the process. Two cooks can follow the same recipe at the same time.
In practice
An IT supporter at a school opens Task Manager on a slow teacher's PC and finds an unknown process running under the teacher's account and using most of the machine; she stops it and has the PC checked for malware.
Why it matters
Harmful software runs as a process too, and it inherits the rights of whoever started it - which is why limiting what an account may do limits the damage an attack can cause.
Technical deep dive
The kernel represents each process with a control block (task_struct in Linux, EPROCESS in Windows) holding its identifier, state, scheduling data, a pointer to its page tables, the table of open file descriptors or handles, signal or exception handlers, resource limits and the security context: real and effective UID/GID plus capabilities on Linux, or an access token with user and group SIDs, privileges and an integrity level on Windows. The address space is typically laid out as program text, data and BSS, heap, memory-mapped libraries and a stack per thread, randomised by ASLR. Threads share the address space and handles of their process but have their own registers and stack, which is why a process, not a thread, is the unit of isolation.
Unix creates processes in two steps: fork() duplicates the caller, cheaply thanks to copy-on-write pages, and execve() replaces the image with a new program while keeping open descriptors not marked close-on-exec, a common source of leaked file handles into child processes. Windows combines both in CreateProcess, and the parent can choose to pass a different token, which is how services launch work as another user. Every process except the first has a parent (PID 1 on Linux is init, today usually systemd). A terminated child whose exit status has not been collected with wait() remains as a zombie; orphans are re-parented to init or a designated subreaper. The scheduler moves processes between running, ready and blocked states and performs context switches, saving and restoring register state and, when switching address spaces, the page-table base.
Security follows from inheritance: a child normally inherits the credentials of its parent, so whatever a user can do, any program they start can do. Controls act on that chain. Privilege escalation means obtaining a process with a stronger token (setuid binaries, sudo, UAC elevation, token theft). Sandboxing narrows what a process can reach with seccomp filters, AppArmor or SELinux domains, Windows AppContainers or Job objects. Linux namespaces and cgroups give a process tree its own view of PIDs, mounts, network and users, plus resource limits, which is all a container is.
Detection engineering relies heavily on process telemetry. Windows event 4688 and Sysmon event 1 record process creation with command line and parent; EDR products watch for suspicious parent-child pairs such as winword.exe spawning powershell.exe. Attackers respond with techniques catalogued in MITRE ATT&CK T1055 (Process Injection), including process hollowing (T1055.012), where a legitimate process is started suspended and its memory replaced, and with living-off-the-land binaries that make malicious activity look like ordinary system processes. A process differs from a program (the file on disk), from a thread (a unit of execution inside it) and from a service, which is a process managed by the service manager rather than started interactively.
What to learn first
Everything this builds on, foundations first.
- Operating system
- →Process
Relationships
- Kinds
- Service
- Requires
- Operating system
- Unlocks
- Container
- Used with
- User accountKernelPermission
Sources & further reading
Textbooks
- Operating Systems: Three Easy Pieces · Arpaci-Dusseau
Where this data comes from
This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.
See the review queueSuggest a correction on GitHubThis term as JSON
Check yourself
Loading…