Process management (computing): Difference between revisions

Content deleted Content added
m A bit more detailed overview of the processes involved in the booting of an operating system.
Mbakun (talk | contribs)
m Added citation for Concurrent Execution from Study Glance.
Line 5:
 
== Multiprogramming ==
In any modern operating system there can be more than one instance of a [[computer program|program]] loaded in memory at the same time. For example, more than one user could be executing the same program, each user having separate copies of the program loaded into memory. With some programs, it is possible to have one copy loaded into memory, while several users have shared access to it so that they can each execute the same program-code. Such a program is said to becalled [[Reentrant (subroutine)|re-entrant]].{{Relevance inline|date=November 2023}} The [[central processing unit|processor]] at any instant can only be executing one instruction from one program but several processes can be sustained over a period of time by assigning each process to the processor at intervals while the remainder become temporarily inactive. AThe numberexecution of processesmultiple being executedprocesses over a period of time, insteadrather ofthan at the same timesimultaneously, is called [[Concurrent computing|concurrent execution]].<ref>{{cnCite web |datelast=NovemberUnknown |first=Unknown |date=2023-09-20 |title=Concurrent Executions in DBMS |url=https://studyglance.in/dbms/display.php?tno=40&topic=Concurrent-Executions-in-DBMS |url-status=live |website=Study Glance}}</ref>
 
A [[multiprogramming]] or [[Computer multitasking|multitasking]] OS is a system that can execute many processes concurrently. Multiprogramming requires that the processor be allocated to each process for a period of time and de-allocated at an appropriate moment. If the processor is de-allocated during the execution of a process, it must be done in such a way that it can be restarted later as easily as possible.
Line 12:
 
# The process issues a [[system call]] (sometimes called a ''software [[interrupt]]''); for example, an I/O request occurs requesting to access a file on a hard disk.
# A hardware [[interrupt]] occurs; for example, a key was pressed on the keyboard, or a timer runs out (used in [[preemption (computing)|pre-emptivepreemptive multitasking]]).
 
The stopping 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.