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
Thread (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!
{{About|the concurrency concept|multithreading in hardware|Multithreading (computer architecture)|the form of code consisting entirely of [[subroutine]] calls|Threaded code|other uses|Thread (disambiguation)}} {{short description|Smallest sequence of programmed instructions that can be managed independently by a scheduler}} [[File:Multithreaded process.svg|thumb|A process with two threads of execution, running on one [[Processor (computing)|processor]]]] [[File:Concepts- Program vs. Process vs. Thread.jpg|thumb|[[Computer program|Program]] vs. [[Process (computing)|Process]] vs. Thread <br/>[[Scheduling (computing)|Scheduling]], [[Preemption (computing)|Preemption]], [[Context switch|Context Switching]]|400x400px]] In [[computer science]], a '''thread''' of [[Execution (computing)|execution]] is the smallest sequence of programmed instructions that can be managed independently by a [[scheduling (computing)|scheduler]], which is typically a part of the [[operating system]].<ref>{{Cite journal |last=Lamport |first=Leslie |author-link=Leslie Lamport |date=September 1979 |title=How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs |url=http://research.microsoft.com/en-us/um/people/lamport/pubs/multi.pdf |journal=IEEE Transactions on Computers |volume=C-28 |pages=690β691 |doi=10.1109/tc.1979.1675439 |number=9 |s2cid=5679366}}</ref> In many cases, a thread is a component of a [[Process (computing)|process]]. The multiple threads of a given process may be executed [[concurrent computation|concurrently]] (via multithreading capabilities), sharing resources such as [[Shared memory (interprocess communication)|memory]], while different processes do not share these resources. In particular, the threads of a process share its executable code and the values of its [[Memory management#HEAP|dynamically allocated]] variables and non-[[thread-local storage|thread-local]] [[global variable]]s at any given time. The implementation of threads and [[process (computing)|processes]] differs between operating systems.<ref name="tanenbaum199200">{{cite book |last=Tanenbaum |first=Andrew S. |author-link=Andrew S. Tanenbaum |title=Modern Operating Systems |date=1992 |publisher=Prentice-Hall International Editions |isbn=0-13-595752-4}}</ref>{{Page needed|date=December 2022}} {{TOCLIMIT|3}}
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)