首页 > 试题广场 >

Consider a multiprocessor syst

[问答题]
Consider a multiprocessor system and a multithreaded program written using the many-to-many threading model.Let the number of user-level threads in the program be more than the number of processors in the system.Discuss the performance implications of the following scenarios.
a.The number of kernel threads allocated to the program is less than the number of processors.
b.The number of kernel threads allocated to the program is equal to the number of processors.
c.The number of kernel threads allocated to the program is greater than the number of processors but less than the number of user-level threads.
推荐
When the number of kernel threads is less than the number of processors,then some of the processors would remain idle since the scheduler maps only kernel threads to processors and not user-level threads to processors.When the number of kernel threads is exactly equal to the number of processors,then it is possible that all of the processors might be utilized simultaneously.However,when a kernel-thread blocks inside the kernel (due to a page fault or while invoking system calls),the corresponding processor would remain idle.When there are more kernel threads than processors,a blocked kernel thread could be swapped out in favor of another kernel thread that is ready to execute,thereby increasing the utilization of the multiprocessor system.
发表于 2018-05-05 22:03:59 回复(0)