Process management (computing): Difference between revisions

Content deleted Content added
Reverted 3 edits by EditorSenpai (talk): Rv, introduced grammatical errors
Undid revision 1252439659 by Lekshmigouri (talk) incorrect terminology
Line 14:
# A hardware [[interrupt]] occurs; for example, a key was pressed on the keyboard, or a timer runs out (used in [[preemption (computing)|preemptive multitasking]]).
 
The terminationstopping of one process and starting (or restarting) of another process is called a [[context switch]] or context change. In many modern operating systems, processes can consist of many sub-processes. This introduces the concept of a ''[[thread (computer science)|thread]]''. A thread may be viewed as a ''sub-process''; that is, a separate, independent sequence of execution within the code of one process. Threads are becoming increasingly important in the design of distributed and [[client–server]] systems and in software run on [[Parallel computing|multi-processor]] systems.
 
==How multiprogramming increases efficiency?==
A common trait observed among processes associated with most computer programs is that they alternate between [[CPU]] cycles and [[I/O]] cycles. For the portion of the time required for CPU cycles, the process is being executed and is occupying the CPU. During the time required for I/O cycles, the process is not using the processor. Instead, it is either waiting to perform Input/Output, or is actually performing Input/Output. An example of this is reading from or writing to a file on disk. Prior to the advent of [[multiprogramming]], [[computers]] operated as single-user systems. Users of such systems quickly become aware that for much of the time that a computer was allocated to a single user -- for example, when a user was entering information or debugging programs -- the processor was idle. [[Computer scientists]] observed that the overall performance of the machine could be improved by letting a different process use the processor whenever one process was waiting for input/output. In a ''uni-programming system'', if ''N'' users were to execute programs with individual execution times of ''t''<sub>1</sub>, ''t''<sub>2</sub>, ..., ''t''<sub>''N''</sub>, then the total time, ''t''<sub>uni</sub>, to service the ''N'' processes (consecutively) of all ''N'' users would be: