DEV Community

Cover image for Processes and Threads
Calzy
Calzy

Posted on

Processes and Threads


Calzy Akmal-2101569

Process Management is a series of activities performed by a computer system to manage, control, and optimize the performance of processes running within the system. Stallings and Tanenbaum (2020) state that process management in an operating system requires proper strategies in resource allocation and memory management to ensure efficient system operation. Process management encompasses several tasks, such as creating and terminating processes, scheduling and allocating computer resources like the CPU, memory, and I/O devices, inter-process communication, and activity synchronization, memory management, and process supervision to prevent system conflicts and failures.

In creating a program using a high-level programming language, a translation process is needed as the computer operates using binary systems consisting of two numbers, 0 and 1. Hence, a compiler is used to translate the high-level language into binary language that can be processed by the computer so that the program written by humans can be understood and executed by the computer.
The role of process management is to optimize the set of code that has been translated by the compiler to make the memory needed by the computer to run the program more orderly and efficient. Additionally, process management also allocates computer resources required to run the program while supervising any execution failures.

The allocation process is performed by the operating system, which automatically divides the necessary memory to run the program so that the program can run optimally and minimize any issues that may arise. The operating system executes the executable created by the compiler by inserting the program's data into memory and allocating the resources needed to run the program.

When the program is running, the status changes from being just a program to a process. According to Tanenbaum and Bos (2015), a process is a program being executed by the operating system, including the data related to the execution such as memory addresses, status, and resource management. In the past, computers could only run one program being executed as the machine's capability was insufficient to run a multi-process system. With technological advancements, computers can now run multiple processes simultaneously, with optimized memory and better performance.

Within a process, there are "threads" that function as the basic execution unit in a program or process. According to Silberschatz, Galvin, and Gagne (2013), a thread can be thought of as a sub-component of a process that can be independently scheduled by the operating system. Threads improve system efficiency and responsiveness by allowing multiple tasks to be executed in parallel within a process. In this regard, threads allow the operating system to effectively utilize processing power.

Process management is crucial in ensuring the efficient execution of multiple processes and threads in an operating system. It involves the allocation of resources, scheduling, memory management, and process communication. A significant challenge in process management is avoiding conflicts among processes, particularly in cases where multiple processes are competing for the same resources.


Operating System Exercise

1. Managing Service

SSHD SSHD

SSHD StopSSHD Stop

SSHD StartSSHD Start

SSHD RestartSSHD Restart

2. Running Init

SSH StatusStatus

3. TOP

TOP


References:

Silberschatz, A., Galvin, P. B., & Gagne, G. (2013). Operating
system concepts (9th ed.). John Wiley & Sons.
Stallings, W., & Tanenbaum, A. S. (2020). Operating Systems:
Internals and Design Principles. Pearson.
Tanenbaum, A. S., & Bos, H. (2015). Modern operating systems (4th
ed.). Pearson Education.

Top comments (0)