A computer program is a list of rules. 
A computer program is a list of rules. 
One process can use many small parts. These parts work at the same time. This helps the computer do many things.
Your computer can do many tasks at once. It switches between them very fast. This makes it look like they run together.
Sometimes a process must wait. It might wait for you to click a mouse. Then it can start working again.
This keeps the computer busy and fast. It is a very smart way to work.
A computer program is a list of rules. It stays still on a disk. A process is what happens when the computer follows those rules. 
One process can have many small parts called threads. These threads can work at the same time.
Most computers use multitasking. This is a way to do many tasks at once. A single CPU core can only do one thing at a time. However, the computer switches between tasks very fast. This is called a context switch. It happens so quickly that it looks like everything is running at once. This is called concurrency. 

A computer program is a collection of instructions. These instructions stay still on a disk. A process is what happens when the computer actually runs those instructions. 
To work, a process needs several important things. It needs a copy of its machine code in the memory. It also needs a space called a heap for temporary data. It uses a call stack to keep track of its current events. The operating system gives the process permission to use certain files. These are often called file descriptors in Unix systems. It also needs the processor, or CPU, to follow its instructions. The system keeps track of all this in a process control block.
Computers use multitasking to handle many processes at once. A single CPU core can only do one thing at a time. To solve this, the computer uses a trick called concurrency. It performs a context switch to swap between different tasks. This switch happens very fast so it looks like they run together. The computer might switch when a task waits for a user to click a mouse. It can also switch when a task has used its fair share of time. This keeps the processor busy instead of letting it sit idle.
Processes go through different stages while they work. First, a process is created when it is loaded into memory. Then, it enters a waiting state for its turn to run. When the scheduler picks it, the state changes to running. If the process must wait for a file, it enters a blocked state. 

This way of working started many years ago. In the early 1960s, software was just for controlling computers. As computers got faster, multiprogramming became very important. This meant running several programs at once to save time. Later, new ideas like time-sharing and networks changed everything. These changes led to the multitasking we use today. You can see this in action when you move a mouse. The computer gives high priority to your movements so they feel instant. This is why your music or video plays smoothly while you work.
In the world of computing, a process is the active instance of a computer program being executed. While a program is a passive collection of instructions stored on a disk, a process is the living execution of those instructions once they are loaded into memory. A single program can result in multiple processes; for example, opening several instances of the same application creates distinct processes. Processes are the fundamental units of work in an operating system (OS). They require specific system resources, permissions, and data structures to initiate and coordinate their activities. 
To function, a process must own several specific resources managed by the operating system. It holds an image of its executable machine code within a region of virtual memory. This memory includes process-specific input and output data, a call stack to track active subroutines, and a heap for intermediate computation data. The process also utilizes operating system descriptors, such as file descriptors in Unix or handles in Windows, to manage data sources and sinks. Furthermore, the process maintains a processor state, or context, which includes the contents of registers and physical memory addressing. The OS tracks this vital information using data structures called process control blocks.
Modern operating systems manage multiple processes through a method called multitasking. A single CPU core can only execute one process at a time. However, multitasking allows the processor to switch between tasks without waiting for each one to finish. This capability is known as preemption. Preemption is vital for interactive tasks, such as moving a mouse or pressing a key, which are given higher priority than CPU-bound tasks. Applications like music or video playback also receive real-time priority to ensure smooth performance. Through rapid context switches, the system creates concurrency, making it appear as though many processes are running simultaneously. 
An operating system scheduler decides exactly when these switches occur. A switch might happen when a task waits for input/output operations or when a task voluntarily yields the CPU. It can also occur due to hardware interrupts or when a scheduler, such as the Linux kernel's Completely Fair Scheduler, decides a process has used its fair share of time. In time-sharing systems, this interleaving of processes and threads allows for efficient resource use. This system ensures that the CPU remains busy rather than sitting idle while a program waits for a slow device, like a printer. 
Every process moves through a specific lifecycle of states. First, a process is "created" when it is loaded from secondary storage, like a hard disk, into main memory. The scheduler then assigns it a "waiting" state while it awaits a context switch. When the scheduler loads the process into the processor, its state changes to "running." If the process must wait for a resource, such as a file to open, it enters a "blocked" state. Once the resource is available, it returns to the waiting state. Finally, once execution is complete or the OS terminates it, the process enters a "terminated" state before being removed from memory.
Because processes often need to work together, operating systems provide mechanisms for inter-process communication (IPC). Processes can communicate by sharing parts of their address spaces or using specific protocols. For instance, in a shell pipeline, the output of one process passes directly to the next. In more complex distributed computing, processes on different machines might use the Message Passing Interface (MPI) to synchronize. This communication is strictly mediated and controlled by the OS to ensure security and reliability. This prevents independent processes from interfering with one another, which helps avoid system failures like deadlock or thrashing.
The history of process management reflects the evolution of computer speed and efficiency. In the early 1960s, software evolved from simple monitor control to executive control. As computers became faster, multiprogramming became necessary to utilize hardware that was neither cheap nor fully utilized. Initially, multiprogramming involved serial concurrency on uniprocessor architectures. As systems moved toward multiple processors, programs could run in true parallel. The transition from simple multiprogramming to modern multitasking, multiprocessing, and multithreading was driven by the invention of re-entrant code, time-sharing, and computer networks.
🖼️ Images & Media (4)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.