process - TarisMajor/5143-OpSystems GitHub Wiki

Definition

A process is an instance of a program in execution. It is the fundamental unit of execution in an operating system, which includes the program code, its current state, and the resources allocated to it, such as memory and CPU time. Processes are managed by the operating system and can perform various tasks concurrently, allowing multitasking and resource sharing.

Each process has a process control block (PCB) that contains information about its state, program counter, CPU registers, memory management information, and I/O status. Processes can be in different states during their lifecycle, such as New, Ready, Running, Waiting, and Terminated.

Key Characteristics of a Process:

Code (Text) Segment: Contains the program’s code (executable instructions). Data Segment: Stores global and static variables. Stack Segment: Stores function call information, local variables, and control information. Heap Segment: Used for dynamic memory allocation during program execution. Inventor and Year of Invention The concept of a process as a unit of execution can be traced back to the development of early operating systems in the 1950s and 1960s. The term “process” in the context of operating systems was popularized as computer systems began using time-sharing techniques.

Key milestones:

1960s - Early Time-Sharing Systems: The development of time-sharing systems at institutions like MIT and Bell Labs led to the idea of managing concurrent executions of programs on a single machine. These systems allowed multiple users to interact with the computer at the same time, which required the concept of processes. 1965 – CTSS (Compatible Time-Sharing System): CTSS, developed at MIT, is one of the first operating systems that implemented the concept of processes in a way that allowed time-sharing. This laid the groundwork for modern process management. While the specific inventor of the "process" is difficult to pinpoint, Ken Thompson and Dennis Ritchie at AT&T Bell Labs were pivotal in defining process management concepts during the development of the Unix operating system in the early 1970s.

Uses

Processes are essential for running applications and system tasks in modern operating systems. They allow the operating system to manage resources effectively by isolating tasks and ensuring that each process can execute independently. Key uses of processes include:

Multitasking: Multiple processes can run concurrently, with the operating system managing CPU time and resource allocation through scheduling. Resource Management: The operating system allocates resources (such as memory, CPU time, and I/O devices) to each process, ensuring that processes do not interfere with each other. Fault Isolation: Each process runs in its own memory space, so faults in one method (e.g., crashes or security breaches) do not directly affect others. Concurrency and Parallelism: Processes enable systems to handle multiple tasks simultaneously through time-slicing in single-core processors (multitasking) or true parallel execution in multi-core processors (multiprocessing). Examples of Where It Is Used Today Web Browsers: Modern web browsers (like Google Chrome, and Mozilla Firefox) run each tab or extension as a separate process. This isolation ensures that if one tab crashes, it does not bring down the entire browser. It also allows the operating system to manage resources more effectively by prioritizing or suspending idle processes.

Server Applications: In web servers, database servers, and application servers, processes are used to handle client requests. Each client or group of clients may have its process, ensuring that the server can handle multiple simultaneous requests without conflict.

Operating Systems: The core function of an operating system is to manage processes. For example, the Linux kernel and Windows OS manage processes through process tables, scheduling algorithms, and memory management techniques.

Mobile Applications: On mobile devices like smartphones, each application is treated as a separate process. Operating systems such as Android and iOS use processes to manage the execution of apps, enabling efficient multitasking and resource management, while preventing apps from interfering with one another.

Virtualization: In virtual machines (VMs), the entire operating system inside the VM runs as a process. Hypervisors such as VMware or KVM create multiple virtualized environments, each running its own operating system in isolation as processes.

Embedded Systems: In embedded systems, processes manage tasks like controlling hardware, managing sensors, or handling user inputs. For example, in an automotive system, processes might handle sensor data processing, navigation, and entertainment concurrently.

Conclusion

The concept of processes is foundational in modern computing, enabling multitasking, efficient resource management, and process isolation. From operating systems to mobile apps and virtual machines, processes are integral to how software operates today. Their management allows operating systems to efficiently schedule tasks, prioritize resources, and ensure system stability and security.