●●● ●●●● 4.2 Multithreading Models ●●●● ●●● ●●●0● ●●●0 °one-to- one mode Each user-level thread maps to a kernel thread ← user thread kkkk kernel thread
12 4.2 Multithreading Models ⚫ One-to-one model ⚫ Each user-level thread maps to a kernel thread
●●● ●●●● 4.2 Multithreading Models : ●●0 o Provides more concurrency by allowing another hread to run when a thread makes a blocking system call Allows multiple threads to run in parallel on multiprocessors o Creating a user thread requires creating the corresponding kernel thread The overhead of creating kernel threads can burden the performance of an application ● EXamples o Windows ntxP/2000 Linux e Solaris 9 and later
13 4.2 Multithreading Models ⚫ Provides more concurrency by allowing another thread to run when a thread makes a blocking system call ⚫ Allows multiple threads to run in parallel on multiprocessors ⚫ Creating a user thread requires creating the corresponding kernel thread ▪ The overhead of creating kernel threads can burden the performance of an application ⚫ Examples ⚫ Windows NT/XP/2000 ⚫ Linux ⚫ Solaris 9 and later
●●● ●●●● 4.2 Multithreading Models 90o ●●●0 · Many-to- Many Model ●●●● Allows many user level threads to be mapped to many kernel threads ← user thread k k)← kernel thread
14 4.2 Multithreading Models ⚫ Many-to-Many Model ⚫ Allows many user level threads to be mapped to many kernel threads
●●● ●●●● 4.2 Multithreading Models : ●●●0 ● Allows the operating system to create a°。。 suffficient number of kernel threads The number of kernel threads may be specific to (1)Aparticular application (2)A particular machine a application may be allocated more kernel threads on a multiprocessor than on an uni-processor
15 4.2 Multithreading Models ⚫ Allows the operating system to create a sufficient number of kernel threads ⚫ The number of kernel threads may be specific to (1)A particular application (2)A particular machine ▪ A application may be allocated more kernel threads on a multiprocessor than on an uni-processor