Thread (computing): Difference between revisions

Content deleted Content added
m.e. - brushup
m.e.
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> 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.