Messages in this thread | | | Date | Tue, 27 Apr 1999 09:04:01 +0100 (BST) | From | Tony Gale <> | Subject | Re: Linus on Linux, Apache and Threads |
| |
On 26-Apr-99 Stephen C. Tweedie wrote: > > That's not the point. Many server systems do use a single > demultiplexing process with multiple worker threads. > > Right now, they typically use something like pipes to share the > work > amongst worker threads. Threads pick the data up in FIFO order > when new > work enters the queue. The problem is that every mechanism we have > for > this will wake up ALL idle worker threads in the kernel: only one > will > actually succeed in grabbing the message, but the others will still > consume kernel-mode CPU time. >
Can I just get some clarification here. pthread_cond_signal is defined as waking *one* thread, thus:
pthread_cond_signal restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.
Are you saying that the kernel will in fact wake up *all* the threads (either just internally, or in actuality)?
-tony
--- E-Mail: Tony Gale <gale@syntax.dera.gov.uk> Vote for ME -- I'm well-tapered, half-cocked, ill-conceived and TAX-DEFERRED!
The views expressed above are entirely those of the writer and do not represent the views, policy or understanding of any other person or official body.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |