OS Threads (use libpthreads to map to the OS’ memory model)
Single-threaded event loop (node.js as an example). There is a
single event loop, where actions on the main loop are blocking, but
there can be asynchronous tasks scheduled.
N:1 threads: The model maps N user threads to a single system
thread. The process then handles running those threads at different
times. These can be more lightweight.
Multi-thread event loops: One or several threads run event
dispatchers. They can move tasks to other threads for execution.
M:N threading library: The model maps M user threads to N system
threads. They are like N:1 threads but more flexibly, but can have
trouble with cache coherence and perforamnce.