Process (computing)

From WikiMD's Wellness Encyclopedia

Concepts- Program vs. Process vs. Thread
Htop 3.0.1 screenshot
KSysGuard 5.22.0 process table screenshot
Process states

Process (computing) is a fundamental concept in computer science and operating systems that refers to an instance of a computer program that is being executed. A process can be thought of as a program in action, consisting of the program code (also known as the text section), its current activity represented by the program counter, and the contents of the processor's registers. A process also includes the process stack, which contains temporary data such as method parameters, return addresses, and local variables, and a heap, which is a memory area allocated for dynamic memory allocation.

Definition[edit | edit source]

In computing, a process is an instance of a computer program that is executed sequentially by a Central Processing Unit (CPU). Each process is a running instance that includes the program code and its current activity. Operating systems support process creation for executing user commands and running system programs. Processes can communicate with each other through Inter-process communication (IPC) mechanisms and can synchronize their actions.

Characteristics[edit | edit source]

A process has several characteristics, including an Identifier (PID), which uniquely identifies each process within the system; a state, which indicates the current status of the process (e.g., running, waiting, stopped); a priority, which influences the process's scheduling; and a context, which includes the process's current values of the program counter, registers, and variables.

Process States[edit | edit source]

The life cycle of a process in an operating system involves several states:

  • New: The process is being created.
  • Ready: The process is waiting to be assigned to a processor.
  • Running: Instructions are being executed.
  • Waiting: The process is waiting for some event to occur (such as an I/O completion or a signal).
  • Terminated: The process has finished execution.

Process Control Block (PCB)[edit | edit source]

Each process is represented in the operating system by a Process Control Block (PCB), which contains important information about the process, such as its PID, state, priority, and associated resources. The PCB is essential for the operating system to manage and schedule processes efficiently.

Scheduling[edit | edit source]

Process scheduling is a key activity of the operating system, which decides which process runs at any given time. Scheduling algorithms, such as First-Come, First-Served (FCFS), Shortest Job First (SJF), and Round Robin (RR), are used to optimize the use of CPU time and ensure that all processes are executed fairly.

Inter-process Communication (IPC)[edit | edit source]

Processes often need to communicate with each other to exchange data or synchronize their actions. This is achieved through IPC mechanisms, such as pipes, message queues, semaphores, and shared memory.

Multithreading[edit | edit source]

In addition to processes, modern operating systems support multithreading, where a process can have multiple threads of execution running concurrently. This allows for more efficient use of resources and faster execution of programs.

Security and Isolation[edit | edit source]

Processes are isolated from each other by the operating system to prevent unauthorized access to memory and resources. This isolation ensures that a failure in one process does not affect the execution of other processes. Security mechanisms, such as user permissions and access controls, are applied to processes to control their access to system resources.

WikiMD
Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD

Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD

WikiMD's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Prab R. Tumpati, MD