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
Operating system
(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!
===Concurrency=== {{see also|Computer multitasking|Process management (computing)}} [[Concurrency (computer science)|Concurrency]] refers to the operating system's ability to carry out multiple tasks simultaneously.{{sfn|Anderson|Dahlin|2014|p=129}} Virtually all modern operating systems support concurrency.{{sfn|Silberschatz et al.|2018|p=159}} [[Thread (computing)|Thread]]s enable splitting a process' work into multiple parts that can run simultaneously.{{sfn|Anderson|Dahlin|2014|p=130}} The number of threads is not limited by the number of processors available. If there are more threads than processors, the operating system [[kernel (operating system)|kernel]] schedules, suspends, and resumes threads, controlling when each thread runs and how much CPU time it receives.{{sfn|Anderson|Dahlin|2014|p=131}} During a [[context switch]] a running thread is suspended, its state is saved into the [[thread control block]] and stack, and the state of the new thread is loaded in.{{sfn|Anderson|Dahlin|2014|pp=157, 159}} Historically, on many systems a thread could run until it relinquished control ([[cooperative multitasking]]). Because this model can allow a single thread to monopolize the processor, most operating systems now can [[interrupt]] a thread ([[preemptive multitasking]]).{{sfn|Anderson|Dahlin|2014|p=139}} Threads have their own thread ID, [[program counter]] (PC), a [[Processor register|register]] set, and a [[Stack-based memory allocation|stack]], but share code, [[heap memory|heap]] data, and other resources with other threads of the same process.{{sfn|Silberschatz et al.|2018|p=160}}{{sfn|Anderson|Dahlin|2014|p=183}} Thus, there is less overhead to create a thread than a new process.{{sfn|Silberschatz et al.|2018|p=162}} On single-CPU systems, concurrency is switching between processes. Many computers have multiple CPUs.{{sfn|Silberschatz et al.|2018|pp=162β163}} [[Parallel computing|Parallelism]] with multiple threads running on different CPUs can speed up a program, depending on how much of it can be executed concurrently.{{sfn|Silberschatz et al.|2018|p=164}}
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)