开发者

What does changing the concurrency level of a thread do?

I was reading the man page of pthread_setconcurrency() and have no idea what it means by "concurrency level". It's simply to vague a term; does ch开发者_如何学Goanging the concurrency level changes the scheduling policies & process priorities? Does it do any other stuff?


From the manual page on 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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜