Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Process (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Multitasking and process management== {{Main|Process management (computing)}} A [[Computer multitasking|multitasking]] [[operating system]] may just switch between processes to give the appearance of many processes [[Execution (computing)|executing]] simultaneously (that is, in [[Parallel computing|parallel]]), though in fact only one process can be executing at any one time on a single [[Central processing unit|CPU]] (unless the CPU has multiple cores, then [[Multithreading (computer architecture)|multithreading]] or other similar technologies can be used).{{Efn|Some modern CPUs combine two or more independent processors in a [[Multi-core processor|multi-core]] configuration and can execute several processes simultaneously. Another technique called [[simultaneous multithreading]] (used in [[Intel]]'s [[Hyper-threading]] technology) can simulate simultaneous execution of multiple processes or threads.}} It is usual to associate a single process with a main program, and child processes with any spin-off, parallel processes, which behave like [[Asynchrony (computer programming)|asynchronous]] subroutines. A process is said to ''own'' resources, of which an ''image'' of its program (in memory) is one such resource. However, in multiprocessing systems ''many'' processes may run off of, or share, the same [[Reentrancy (computing)|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 system|embedded]] operating systems. The sense of "process" (or task) is "something that takes up time", as opposed to "memory", which is "something that takes up space".{{Efn|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).}} The above description applies to both processes managed by an operating system, and processes as defined by [[process calculus|process calculi]]. If a process requests something for which it must wait, it will be blocked. When the process is in the [[Process state|blocked state]], it is eligible for swapping to disk, but this is transparent in a [[virtual memory]] system, where regions of a process's memory may be really on disk and not in [[Computer data storage#Primary storage|main memory]] at any time. Even portions of active processes/tasks (executing programs) are eligible for swapping to disk, if the portions have not been used recently. Not all parts of an executing program and its data have to be in physical memory for the associated process to be active. ===Process states=== {{Main|Process state}} [[File:Process states.svg|right|300px|thumb|The various process states, displayed in a [[state diagram]], with arrows indicating possible transitions between states]] An operating system [[kernel (operating system)|kernel]] that allows multitasking needs processes to have [[process states|certain states]]. Names for these states are not standardised, but they have similar functionality.<ref name="OSC Chap4"/> * First, the process is "created" by being loaded from a [[Auxiliary memory|secondary storage]] device ([[hard disk drive]], [[CD-ROM]], etc.) into [[main memory]]. After that the [[Scheduling (computing)|process scheduler]] assigns it the "waiting" state. * While the process is "waiting", it waits for the [[scheduling (computing)|scheduler]] to do a so-called [[context switch]]. The context switch loads the process into the processor and changes the state to "running" while the previously "running" process is stored in a "waiting" state. * If a process in the "running" state needs to wait for a resource (wait for user input or file to open, for example), it is assigned the "blocked" state. The process state is changed back to "waiting" when the process no longer needs to wait (in a blocked state). * Once the process finishes execution, or is terminated by the operating system, it is no longer needed. The process is removed instantly or is moved to the "terminated" state. When removed, it just waits to be removed from main memory.<ref name="OSC Chap4" /><ref name="Stallings">{{cite book |last=Stallings |first=William |date=2005 |title=Operating Systems: internals and design principles |edition=5th |publisher=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")</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)