Thread (computing): Difference between revisions

Content deleted Content added
m Added links
Tags: Mobile edit Mobile app edit iOS app edit App section source
Single-threaded vs multithreaded programs: Fixed wording and link. A CPU executes instructions, not commands.
Tags: Mobile edit Mobile web edit
Line 92:
 
==Single-threaded vs multithreaded programs==
In [[computer programming]], ''single-threading'' is the processing of one [[CommandMachine (computing)code|commandinstruction]] at a time.<ref>{{Cite book |first1=Raúl |last1=Menéndez |first2=Doug |last2=Lowe |url=https://books.google.com/books?id=j1t1u_UniU0C&q=%22single+threading%22 |title=Murach's CICS for the COBOL Programmer |date=2001 |publisher=Mike Murach & Associates |isbn=978-1-890774-09-7 |page=512}}</ref> In the formal analysis of the variables' [[Semantics (computer science)|semantics]] and process state, the term ''single threading'' can be used differently to mean "backtracking within a single thread", which is common in the [[functional programming]] community.<ref>{{Cite book |first1=Peter William |last1=O'Hearn |first2=R. D. |last2=Tennent |url=https://books.google.com/books?id=btp58ihqgccC&pg=PA157 |title=ALGOL-like languages |date=1997 |publisher=[[Birkhäuser Verlag]] |isbn=978-0-8176-3937-2 |volume=2 |page=157}}</ref>
 
Multithreading is mainly found in multitasking operating systems. Multithreading is a widespread programming and execution model that allows multiple threads to exist within the context of one process. These threads share the process's resources, but are able to execute independently. The threaded programming model provides developers with a useful abstraction of concurrent execution. Multithreading can also be applied to one process to enable [[parallel computing|parallel execution]] on a [[multiprocessing]] system.