We have user threads and kernel threads. We must establish a relationship between user and kernel threads. There are 3 ways to do this:
- Many to one model:one kernel thread and several user threads.
- Thread management is done by a thread library so its easy
- Entire process will block if a thread makes a blocking call
- No multithreading
- One to one model: pairs of user threads to kernel threads.
-
Multithreading
-
Must have both user and kernel thread at once. Slower performance the more threads you have
- Many to many: all user threads and all kernel threads connect to one central location
- Almost the same # of kernel threads to # of user threads
- Multithreading
- Blocking won’t disrupt system
Hyperthreading/Simultaneous Multithreading(SMT)
Same as Multithreading but used by Intel. CPU cores matter for multithreading.
A single core can have multiple threads