A process represents a program in execution. When a program is loaded into memory and actively running, it is considered a process. It includes the program code, its associated data, and the program counter, which keeps track of the instruction currently being executed.
Assume you have three applications open on your computer: a web browser, a code editor, and a multimedia player. Each of these applications is a program that is intended to execute specific functions. However, when you run these applications, they become more than just a collection of instructions on your hard disk. They become processes that run and perform activities on your computer.
What the process involves:
Program in Execution: When you double-click on a program’s icon to launch it, the operating system loads it into memory and begins executing its instructions. This loaded program, combined with all of the resources given to it, is a process.
Memory Allocation: When a program becomes a process, the operating system assigns memory to it. This memory stores the program’s code, variables, and other data structures required for execution. Memory allocated to a process is often divided into sections such as the stack, heap, code (text), and data segments, each of which serves a particular role during the process’ execution.
Resource and Control Structures: Processes can access a variety of system resources, including CPU time, memory, input/output devices (such as keyboards, mouse, and monitors), and files. The operating system maintains these resources and controls process execution using data structures and algorithms.
Isolation and Inter-Process Communication: Processes are typically isolated from each other, meaning that they cannot directly access each other’s memory space. Operating systems provide mechanisms for inter-process communication to facilitate communication and synchronization between processes when necessary.
A process in an operating system is considerably more than a simple program that runs on your computer. It describes a program’s dynamic execution, including memory allocation, resource management, and operating system-provided control structures.