Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does POSIX require two levels of contention scope?

0
Posted

Does POSIX require two levels of contention scope?

0

> I have a question concernign pthreads and POSIX. Does POSIX require that > there are two levels of contention scope supported > (PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS) for the pthreads? I > understand that many platforms support the 1-1 model, where one > user-level thread (ULT) maps to one kernel-level schedulable “entity”. POSIX requires an implementation to support AT LEAST ONE of the two contention scopes. While some may support both, that’s not required. Also, the only way to determine which scopes are supported is to try creating the threads and see whether one or the other fails. And note that anyone who can do “1 to 1” threads could easily “cheat” and claim to support both. There’s nothing a legal/portable program can do to detect whether the implementation has “lied” and given it a system contention scope (SCS) thread when it asked for PCS (process contention scope). The converse isn’t true: an implementation that gives a PCS thread when asked for an SCS thread is brok

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123