Citizendia
Your Ad Here

In computing, a process is an instance of a computer program that is being sequentially executed[1] by a computer system that has the ability to run several computer programs concurrently. Computer programs (also software programs, or just programs) are instructions for a Computer. In Computer science, concurrency is a properties of system in which several Computational processes are executing at the same time and potentially interacting

A computer program itself is just a passive collection of instructions, while a process is the actual execution of those instructions. Several processes may be associated with the same program; for example, opening up several windows of the same program typically means more than one process is being executed. In the computing world, processes are formally defined by the operating system(s)(OS) running them and so may differ in detail from one OS to another.

A single computer processor executes one or more (multiple) instructions at a time (per clock cycle), one after the other (this is a simplification; for the full story, see superscalar CPU architecture). A superscalar CPU architecture implements a form of parallelism called Instruction-level parallelism within a single processor To allow users to run several programs at once (e. g. , so that processor time is not wasted waiting for input from a resource), single-processor computer systems can perform time-sharing. A computer is a Machine that manipulates data according to a list of instructions. Time-sharing refers to sharing a computing resource among many users by multitasking. Time-sharing allows processes to switch between being executed and waiting (to continue) to be executed. A context switch is the Computing process of storing and restoring the state ( context) of a CPU such that multiple processes can share In most cases this is done very rapidly, providing the illusion that several processes are executing 'at once'. (This is known as concurrency or multiprogramming. In Computer science, concurrency is a properties of system in which several Computational processes are executing at the same time and potentially interacting In computing Multitasking is a method by which multiple tasks also known as processes, share common processing resources such as a CPU. ) Using more than one physical processor on a computer, permits true simultaneous execution of more than one stream of instructions from different processes, but time-sharing is still typically used to allow more than one process to run at a time. Multiprocessing is the use of two or more central processing units (CPUs within a single computer system (Concurrency is the term generally used to refer to several independent processes sharing a single processor; simultaneity is used to refer to several processes, each with their own processor. ) Different processes may share the same set of instructions in memory (to save storage), but this is not known to any one process. Each execution of the same set of instructions is known as an instance— a completely separate instantiation of the program. In its simplest embodiment an object is an allocated region of storage

For security and reliability reasons most modern operating systems prevent direct communication between 'independent' processes, providing strictly mediated and controlled inter-process communication functionality. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination Inter-Process Communication ( IPC) is a set of techniques for the exchange of data among two or more threads in one or more processes.

Contents

Sub-processes and multithreading

A process may split itself into multiple 'daughter' sub-processes or threads that execute in parallel, running different instructions on much of the same resources and data (or, as noted, the same instructions on logically different resources and data). A thread in Computer science is short for a thread of execution. A thread in Computer science is short for a thread of execution.

Multithreading is useful when various 'events' are occurring in an unpredictable order, and should be processed in another order than they occur, for example based on response time constraints. Multithreading makes it possible for the processing of one event to be temporarily interrupted by an event of higher priority. Multithreading may result in more efficient CPU time utilization, since the CPU may switch to low-priority tasks while waiting for other events to occur.

For example, a word processor could perform a spell check as the user types, without "freezing" the application - a high-priority thread could handle user input and update the display, while a low-priority background process runs the time-consuming spell checking utility. This results in that the entered text is shown immediately on the screen, while spelling mistakes are indicated or corrected after a longer time.

Multithreading allows a server, such as a web server, to serve requests from several users concurrently. A server is a Computer dedicated to providing one or more services over a computer network typically through a request-response routine The term web server can mean one of two things A Computer program that is responsible for accepting HTTP requests from web clients which are Thus, we can avoid that requests are left unheard if the server is busy with processing a request. One simple solution to that problem is one thread that puts every incoming request in a queue, and a second thread that processes the requests one by one in a first-come first-served manner. However, if the processing time is very long for some requests (such as large file requests or requests from users with slow network access data rate), this approach would result in long response time also for requests that do not require long processing time, since they may have to wait in queue. One thread per request would reduce the response time substantially for many users and may reduce the CPU idle time and increase the utilization of CPU and network capacity. In case the communication protocol between the client and server is a communication session involving a sequence of several messages and responses in each direction (which is the case in the TCP transport protocol used in for web browsing), creating one thread per communication session would reduce the complexity of the program substantially, since each thread is an instance with its own state and variables. In Computer science, in particular networking, a session is a semi-permanent interactive information exchange also known as a dialogue a conversation or a meeting The Transmission Control Protocol (TCP is one of the core protocols of the Internet Protocol Suite. In Computer networking, the Transport Layer is a group of methods and protocols within a layered architecture of network components within which it is responsible for encapsulating In its simplest embodiment an object is an allocated region of storage

In a similar fashion, multi-threading would make it possible for a client such as a web browser to communicate efficiently with several servers concurrently. A client is an application or system that accesses a remote service on another Computer system, known as a server, by way of a Network.

A process that has only one thread is referred to as a single-threaded process, while a process with multiple threads is referred to as a multi-threaded process. Multi-threaded processes have the advantage over multi-process systems that they can perform several tasks concurrently without the extra overhead needed to create a new process and handle synchronised communication between these processes. However, single-threaded processes have the advantage of even lower overhead.

[2]

Representation

In general, a computer system process consists of (or is said to 'own') the following resources:

The operating system holds most of this information about active processes in data structures called process control blocks (PCB). A Process Control Block (PCB also called Task Control Block or Task Struct is a data structure in the Operating system kernel containing the information needed to

Any subset of resources, but typically at least the processor state, may be associated with each of the process' threads in operating systems that support threads or 'daughter' processes. A thread in Computer science is short for a thread of execution.

The operating system keeps its processes separated and allocates the resources they need so that they are less likely to interfere with each other and cause system failures (e. g. , deadlock or thrashing). A deadlock is a situation wherein two or more competing actions are waiting for the other to finish and thus neither ever does In Computer science, thrash (verb is the term used to describe a degenerate situation on a computer where increasing resources are used to do a decreasing amount of work The operating system may also provide mechanisms for inter-process communication to enable processes to interact in safe and predictable ways. Inter-Process Communication ( IPC) is a set of techniques for the exchange of data among two or more threads in one or more processes.


Process management in multitasking operating systems

A multitasking* operating system may just switch between processes to give the appearance of many processes executing concurrently or simultaneously, though in fact only one process can be executing at any one time on a single-core CPU (unless using multi-threading or other similar technology). Process management is an integral part of any modern day Operating system (OS In computing Multitasking is a method by which multiple tasks also known as processes, share common processing resources such as a CPU. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination Execution in computer and Software engineering is the process by which a Computer or Virtual computer carries out the instructions In Computer science, concurrency is a properties of system in which several Computational processes are executing at the same time and potentially interacting [3]

It is usual to associate a single process with a main program, and 'daughter' ('child') processes with any spin-off, parallel processes, which behave like asynchronous subroutines. Asynchrony, in the general meaning is the state of not being synchronized. A process is said to own resources, of which an image of its program (in memory) is one such resource. (Note, however, that in multiprocessing systems, many processes may run off of, or share, the same reentrant program at the same location in memory— but each process is said to own its own image of the program. )

Processes are often called tasks in embedded operating systems. An embedded system is a special-purpose Computer system designed to perform one or a few dedicated functions often with Real-time computing constraints The sense of 'process' (or task) is 'something that takes up time', as opposed to 'memory', which is 'something that takes up space'. (Historically, the terms 'task' and 'process' were used interchangeably, but the term 'task' seems to be dropping from the computer lexicon. )

The above description applies to both processes managed by an operating system, and processes as defined by process calculi. In Computer science, the process calculi (or process algebras) are a diverse family of related approaches to formally modelling Concurrent systems Process

If a process requests something for which it must wait, it will be blocked. When the process is in the Blocked State, it is eligible for swapping to disk, but this is transparent in a virtual memory system, where blocks of memory values may be really on disk and not in main memory at any time. In a multitasking Computer system processes may occupy a variety of states. Virtual memory is a Computer system technique which gives an application program the impression that it has contiguous working memory while in fact it may be physically Computer data storage, often called storage or memory, refers to Computer components devices and recording media that retain digital Note that even unused portions of active processes/tasks (executing programs) are eligible for swapping to disk. All parts of an executing program and its data do not have to be in physical memory for the associated process to be active.

______________________________

*Tasks and processes refer essentially to the same entity. And, although they have somewhat different terminological histories, they have come to be used as synonyms. Today, the term process is generally preferred over task, except when referring to 'multitasking', since the alternative term, 'multiprocessing', is too easy to confuse with multiprocessor (which is a computer with two or more CPUs).

Process states

Main article: Process states
The various process states, displayed in a state diagram, with arrows indicating possible transitions between states.
The various process states, displayed in a state diagram, with arrows indicating possible transitions between states. In a multitasking Computer system processes may occupy a variety of states. State diagrams is a Diagram used in the field of Computer science, representing the behavior of a system which is composed of a finite number of states

Processes go through various process states which determine how the process is handled by the operating system kernel. In a multitasking Computer system processes may occupy a variety of states. In Computer science, the kernel is the central component of most computer Operating systems (OS The specific implementations of these states vary in different operating systems, and the names of these states are not standardised, but the general high-level functionality is the same. [2]

When a process is created, it needs to wait for the process scheduler (of the operating system) to set its status to "waiting" and load it into main memory from secondary storage device (such as a hard disk or a CD-ROM). Scheduling is a key concept in Computer multitasking and Multiprocessing Operating system design and in Real-time operating system design Computer data storage, often called storage or memory, refers to Computer components devices and recording media that retain digital Computer data storage, often called storage or memory, refers to Computer components devices and recording media that retain digital A hard disk drive ( HDD) commonly referred to as a hard drive, hard disk, or fixed disk drive, is a Non-volatile storage device CD-ROM (an initialism of "Compact Disc Read-Only Memory " is a pre-pressed Compact Disc that contains data accessible to but not writable Once the process has been assigned to a processor by a short-term scheduler, a context switch is performed (loading the process into the processor) and the process state is set to "running" - where the processor executes its instructions. Scheduling is a key concept in Computer multitasking and Multiprocessing Operating system design and in Real-time operating system design A context switch is the Computing process of storing and restoring the state ( context) of a CPU such that multiple processes can share If a process needs to wait for a resource (such as waiting for user input, or waiting for a file to become available), it is moved into the "blocked" state until it no longer needs to wait - then it is moved back into the "waiting" state. Once the process finishes execution, or is terminated by the operating system, it is moved to the "terminated" state where it waits to be removed from main memory. [2][4]

Inter-process communication

Processes can communicate with each other via Inter-process communication (IPC). Inter-Process Communication ( IPC) is a set of techniques for the exchange of data among two or more threads in one or more processes. This is possible for both processes running on the same machine and on different machines. The subject is a difficult one to discuss concisely, because it differs considerably from one operating system (OS) to another. However, a useful way to approach it is to consider the general mechanisms used in one form or another by most OS and to recognize that any given OS will only employ some subset of that universe.


History

See also: History of operating systems

By the early 60s computer control software had evolved from Monitor control software, e. The history of computer Operating systems recapitulates to a degree the recent History of computer hardware. g. , IBSYS, to Executive control software, making it possible to do multiprogramming. IBSYS was the tape based Operating system that IBM supplied with its IBM 7090 and In computing Multitasking is a method by which multiple tasks also known as processes, share common processing resources such as a CPU. Multiprogramming is a rudimentary form of multiprocessing in which several programs are run "at the same time" (i. Multiprocessing is the use of two or more central processing units (CPUs within a single computer system e. , concurrently) on a single uniprocessor. In Computer science, concurrency is a properties of system in which several Computational processes are executing at the same time and potentially interacting That is, several programs are allowed to share the CPU- a scarce resource. Since there was only one processor, there was no true simultaneous execution of different programs. Instead, the later computer 'monitor-type' control software (known by then also as 'Executive' systems), and early "operating systems," typically allowed execution of part of one program until it was halted by some missing resource (e. g. , input), or until some slow operation (e. g. , output) had completed. At that point, a second (or nth) program was started or restarted. To the user it appeared that all programs were executing "at the same time" (hence the term, concurrent).

Shortly thereafter, the notion of a 'program' was expanded to the notion of an 'executing program and its context,' i. e. , the concept of a process was born. This became necessary with the invention of re-entrant code. Threads came somewhat later. A thread in Computer science is short for a thread of execution. However, with the advent of time-sharing; computer networks; multiple-CPU, shared memory computers; etc. Time-sharing refers to sharing a computing resource among many users by multitasking. A computer network is a group of interconnected Computers. Networks may be classified according to a wide variety of characteristics In Computing, shared memory is a memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies , the old "multiprogramming" gave way to true multitasking, multiprocessing and, later, multithreading. In computing Multitasking is a method by which multiple tasks also known as processes, share common processing resources such as a CPU. Multithreading computers have hardware support to efficiently execute multiple threads.

See also

Notes

  1. ^ Knott 1974, p. A child process is a Computer process created by another process (the Parent process) A Computer process terminates its execution by making an exit System call. In Computing, when a process forks, it creates a copy of itself which is called a " child process. An orphan process is a computer process whose Parent process has finished or terminated. A parent process is a Computer process that has created one or more Child processes In UNIX, every process except process 0 (the swapper is created In POSIX -conformant Operating systems a process group denotes a collection of one or more processes Process groups are used to control the distribution In a multitasking Computer system processes may occupy a variety of states. A task is "an execution path through address space" In other words a set of program instructions that are loaded in memory. A thread in Computer science is short for a thread of execution. In modern Computer Operating systems a process (or task) may wait on another process to complete its execution On Unix and Unix-like computer Operating systems a zombie process or defunct process is a process that has completed execution Process management is an integral part of any modern day Operating system (OS 8
  2. ^ a b c d SILBERSCHATZ, Abraham; CAGNE, Greg, GALVIN, Peter Baer (2004). Silberschatz obtained his PhD from the State University of New York at Stony Brook. "Chapter 4", Operating system concepts with Java, Sixth Edition, John Wiley & Sons, Inc.. John Wiley & Sons Inc, also referred to as Wiley, is a global Publishing company that markets its products to professionals and consumers students and instructors ISBN 0-471-48905-0.  
  3. ^ Some modern CPUs combine two or more independent processors and can execute several processes simultaneously - see Multi-core for more information. A multi-core processor (or chip-level multiprocessor, CMP) combines two or more independent cores into a single package composed of a single Integrated Another technique called simultaneous multithreading (used in Intel's Hyper-threading technology) can simulate simultaneous execution of multiple processes or threads. Simultaneous multithreading, often abbreviated as SMT, is a technique for improving the overall efficiency of Superscalar CPUs with Hardware Hyper-threading (officially termed Hyper-Threading Technology or HTT) is an Intel-proprietary technology
  4. ^ Stallings, William (2005). Operating Systems: internals and design principles (5th edition). Prentice Hall. ISBN 0-13-127837-1.  
    Particularly chapter 3, section 3. 2, "process states", including figure 3. 9 "process state transition with suspend states"

References


© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic