This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Encouraging the kernel(?) to more efficiently wake my threads


Chris Stankevitz wrote:

> Are you are implying that the problem I am seeing is
> typical for semaphores?

Nope, just offering the general advice that it's useful to explore
the facilities available to you.  It was a vague stab in the dark
because I don't know the details of the problem your program solves.

The main problem with the program as you've described it is step (c)
"wait for the four baby threads to complete".  Instead of sleeping and
handing control to child thread 4, for some reason the parent is
hogging a CPU.

It might be easier for people to give concrete advice if faced with
some example code demonstrating the problem.

Regards,
Jonathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]