Tnx for the insight man. But i wonder why this doesn't happen after my program has finished initialization were all the threads are blocked at semop(). cpu usage at this state is bellow 1%. after i run the program ( a thread calls semop(+) ), the cpu usage starts to rise (understandably). But...
When a thread is blocked at a semaphore (e.g. in semop()), does the thread really become idle (no operations), or will it poll inside the semop() operation waiting for a free resource? I have this multithreaded program that when all threads are blocked at semop(), the CPU usage does not go below...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.