HOME

TheInfoList




In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and software. It has sci ...

computing
, a process is the instance of a
computer program In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret. In declarative programming, a ''computer program'' is a Set (mathematics), set of instructions. A comp ...
that is being executed by one or many threads. It contains the program code and its activity. Depending on the
operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

operating system
(OS), a process may be made up of multiple threads of execution that execute instructions concurrently. While a computer program is a passive collection of
instructions Instruction or instructions may refer to: Computing * Instruction, one operation of a processor within a computer architecture instruction set * Computer program, a collection of instructions Music * Instruction (band), a 2002 rock band from New Y ...
typically stored in a file on disk, a process is the execution of those instructions after being loaded from the disk into memory. Several processes may be associated with the same program; for example, opening up several instances of the same program often results in more than one process being executed. Multitasking is a method to allow multiple processes to share
processors A central processing unit (CPU), also called a central processor, main processor or just Processor (computing), processor, is the electronic circuitry that executes Instruction (computing), instructions comprising a computer program. The CPU per ...

processors
(CPUs) and other system resources. Each CPU (core) executes a single task at a time. However, multitasking allows each processor to
switch In , a switch is an that can disconnect or connect the conducting path in an , interrupting the or diverting it from one conductor to another. The most common type of switch is an electromechanical device consisting of one or more sets of movab ...
between tasks that are being executed without having to wait for each task to finish ( preemption). Depending on the operating system implementation, switches could be performed when tasks initiate and wait for completion of
input/output In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithm of an algorithm (Euclid's algorithm) for calculating the greatest commo ...
operations, when a task voluntarily yields the CPU, on hardware
interrupt In s, an interrupt is a response by the to an event that needs attention from the software. An interrupt condition alerts the processor and serves as a request for the processor to interrupt the currently executing code when permitted, so that ...

interrupt
s, and when the operating system scheduler decides that a process has expired its fair share of CPU time (e.g, by the
Completely Fair Scheduler The Completely Fair Scheduler (CFS) is a process scheduler which was merged into the 2.6.23 (October 2007) release of the Linux Linux ( or ) is a family of free and open-source software, open-source Unix-like operating systems based on th ...
of the
Linux kernel The Linux kernel is a free and open-source Free and open-source software (FOSS) is software that is both free software and open-source software where anyone is free software license, freely licensed to use, copy, study, and change the softwar ...
). A common form of multitasking is provided by CPU's
time-sharing In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softw ...
that is a method for interleaving the execution of users' processes and threads, and even of independent kernel tasks - although the latter feature is feasible only in preemptive kernels such as
Linux Linux ( or ) is a family of open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product ...
. Preemption has an important side effect for interactive processes that are given higher priority with respect to CPU bound processes, therefore users are immediately assigned computing resources at the simple pressing of a key or when moving a mouse. Furthermore, applications like video and music reproduction are given some kind of real-time priority, preempting any other lower priority process. In time-sharing systems,
context switch In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and softwa ...
es are performed rapidly, which makes it seem like multiple processes are being executed simultaneously on the same processor. This simultaneous execution of multiple processes is called concurrency. For security and reliability, most modern
operating system An operating system (OS) is system software System software is software designed to provide a platform for other software. Examples of system software include operating systems (OS) like macOS, Linux, Android (operating system), Android and Mi ...

operating system
s prevent direct
communication Communication (from Latin Latin (, or , ) is a classical language A classical language is a language A language is a structured system of communication Communication (from Latin ''communicare'', meaning "to share" or "to b ...
between independent processes, providing strictly mediated and controlled inter-process communication functionality.


Representation

In general, a computer system process consists of (or is said to ''own'') the following resources: * An ''image'' of the executable
machine code In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, ge ...
associated with a program. * Memory (typically some region of
virtual memory In computing, virtual memory, or virtual storage is a Memory management (operating systems), memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "cre ...

virtual memory
); which includes the executable code, process-specific data (input and output), a
call stack In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of Algor ...
(to keep track of active
subroutine In computer programming Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a particular task. Programming involves tasks such as analysis, generat ...
s and/or other events), and a
heap Heap or HEAP may refer to: Computing and mathematics * Heap (data structure), a data structure commonly used to implement a priority queue * Heap (mathematics), a generalization of a group * Heap (programming) (or free store), an area of memory for ...
to hold intermediate computation data generated during run time. * Operating system descriptors of resources that are allocated to the process, such as
file descriptor In Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser Multi-user software is computer software Software is a collection of Instruction (computer science), instructions and data (computing), data that tell a compute ...
s (
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser Multi-user software is computer software Software is a collection of Instruction (computer science), instructions that tell a computer how to work. This is in contrast t ...

Unix
terminology) or handles (
Windows Microsoft Windows, commonly referred to as Windows, is a group of several proprietary {{Short pages monitor