Thread (computing): Difference between revisions

Content deleted Content added
Undid revision 1177738438 by 115.244.107.74 (talk) original fine and consistent
m.e. - brushup
Line 4:
[[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> The implementation of threads and [[process (computing)|processes]] differs between operating systems. In ''[[Modern Operating Systems]]'', [[Andrew_S._Tanenbaum|Tanenbaum]] shows that many distinct models of process organization are possible.<ref name="tanenbaum199200">TANENBAUM, Andrew S. Modern Operating Systems. 1992. Prentice-Hall International Editions, ISBN 0-13-595752-4.</ref>{{Page needed|date=December 2022}} In many cases, a thread is a component of a 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 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.
{{TOCLIMIT|3}}
 
The implementation of threads and [[process (computing)|processes]] differs between operating systems. In ''[[Modern Operating Systems]]'', [[Andrew_S._Tanenbaum|Tanenbaum]] shows that many distinct models of process organization are possible.<ref name="tanenbaum199200">TANENBAUM, Andrew S. Modern Operating Systems. 1992. Prentice-Hall International Editions, ISBN 0-13-595752-4.</ref>{{Page needed|date=December 2022}}
 
{{TOCLIMIT|3}}
== History ==
{{expand section|date=February 2021}}