Glossaria.net

Glossary Concurrency / Term

Shared-memory system threads vs message passing user or hybrid threads

[Shared-memory system threads vs message passing user or hybrid threads] System threads can utilize both hardware parallelism and shared memory (and have been seen as the go-to approach for concurrency due to it), but this flexibility has significant trade-offs that make message passing without system threads more optimal for use cases that don't take advantage of the flexibility, such as servers that mostly wait for input and output.

Hybrid threading allows taking advantage of hardware parallelism while offering better scaling for i/o-bound use cases, and message passing allows even programs hosted on a single system thread to avoid blocking by communicating with an underlying thread pool dedicated to waiting for i/o (notably, that is the approach that allows JavaScript to be used for concurrency).


< Scheduling (flow control, temporal composition) Glossary / Concurrency Shared state vs message passing (distributed state) >