Что делает изменение уровня параллелизма потока? - PullRequest
2 голосов
/ 22 июля 2011

Я читал справочную страницу pthread_setconcurrency() и понятия не имею, что это значит под "уровнем параллелизма". Это просто смутный термин; меняет ли уровень параллелизма политику планирования и приоритеты процесса? Это делает что-нибудь еще?

1 Ответ

3 голосов
/ 22 июля 2011

Со страницы руководства в Linux :

NOTES
       The default concurrency level is 0.

       Concurrency levels are only meaningful for M:N threading implementations, where at any moment a subset of a process's set  of  user-level  threads
       may be bound to a smaller number of kernel-scheduling entities.  Setting the concurrency level allows the application to give the system a hint as
       to the number of kernel-scheduling entities that should be provided for efficient execution of the application.

       Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the concurrency level has no meaning.  In other  words,  on  Linux  these
       functions merely exist for compatibility with other systems, and they have no effect on the execution of a program.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...