Content deleted Content added
No edit summary |
No edit summary |
||
Line 10:
Systems like [[Windows NT]] and [[OS/2]] are said to have "cheap" threads and "expensive" processes, while in systems like [[Linux]] there is not so big a difference.
An advantage of a multi-threaded program is that it can operate faster on [[computer system]]s that have multiple [[CPU]]s, or across a [[computer cluster|cluster]] of machines. This is because the threads of the program naturally lend themselves for truly [[concurrent programming|concurrent]] [[execution (computers)|execution]].
Use of threads in [[programming]] often causes a [[state inconsistency]]. A common [[anti-pattern]] is to set a [[global variable]], then invoke [[subprogram]]s that depend on its value. This is known as [[accumulate and fire]].
Operating systems generally implement threads in either of two ways: [[preemptive multithreading]], or [[cooperative multithreading]]. Preemptive multithreading is the superior implementation, as it allows the operating system to determine when a [[context switch]] should occur.
The [[Java programming language]] is an example of a [[computer language]] which supports multi-threaded [[computer program|program]]s.
Hardware support for software threads is provided by [[simultaneous multithreading]]. This feature was introduced in [[Intel]]'s [[Pentium 4]] processor, with the name ''[[Hyper-threading]]''.
==[[Programming tool]]s==
*[[Apache Portable Runtime]] (APR)
*[[Boost Threads]]
*[[BSP-Library]]
*[[Cheap Threads]]
*[[Common Cpp|Common C++]]
*[[Cpp Portable Types Library|C++ Portable Types Library]]
*[[Cpp Threads|C++ Threads]]
*[[GNU Portable Threads library]] (Pth)
*[[JThreads-Cpp|JThreads/C++]]
*[[Liboop]]
*[[Libthreadedserver]]
*[[Multithreaded Server Class]]
*[[netthreadedserver]]
*[[OpenThreads]]
*[[OpenTop]]
*[[pthread]]
*[[RTpp|RT++]]
*[[SafePt]]
*[[TThread]]
*[[Weftspp|Wefts++]]
*[[Win32]]
*[[Wonderlib]]
*[[ZThreads]]
==See also==
* [[Thread-safety|Thread safety]]
* [[Threading model]]
* [[green threads]]
* [[socket]]s
* [[server]]s
* [[worker]]
* [[communication]]
* [[signal]]s
* [[completion port]]
* [[synchronization]]
* [[priority inversion]]
* [[Occam programming language|Occam]]
* [[SR language]]
* [[OpenMP]]
* [[CORBA]]
* [[.NET]]
* [[DotGNU Execution Environment]]
* [[ProActive]]
* [[Adaptive Communication Environment]] (ACE™)
* [[clone (function)|clone()]]
* [[fork (function)|fork()]]
* [[Lock-free and wait-free algorithms]]
* [[Communicating sequential processes]]
* [[Message passing]]
* [[Microkernel]]
----
An unrelated use of the term '''thread''' is for [[threaded code]], which is a form of code consisting entirely of [[subroutine]] calls, written without the subroutine call instruction, and processed by an [[interpreter (computing)|interpreter]] or the CPU. Two threaded code languages are [[Forth programming language|Forth]] and early [[B programming language]]s.
==
* [http://arstechnica.com/paedia/h/hyperthreading/hyperthreading-1.html Ars Technica article about multithreading, etc]
* [http://www.ece.utexas.edu/~valvano/EE345M/view04.pdf Page 1] & [http://www.ece.utexas.edu/~valvano/EE345M/view05.pdf Page 2], a preemptive multithreaded implementation described
* [news:comp.programming.threads Forum]
* [http://www.lambdacs.com/cpt/FAQ.html Frequently Asked Questions], [http://www.lambdacs.com/cpt/MFAQ.html Most FAQ]
* [http://groups.google.com/groups?group=comp.programming.threads&threadm=580fae16.0312210310.1410bf2b%40posting.google.com Discussion "Writing a scalable server"]
Line 47 ⟶ 85:
* [http://www.cs.rice.edu/CS/Systems/ScalaServer/ System support for scalable network servers]
* [http://citeseer.nj.nec.com/larus02using.html cohort scheduling]
|