[lkml]   [1998]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Thread implementations...
    David S. Miller wrote:
    > The problem, for one, with web etc. servers is the incoming connection
    > socket. If you could tell select/poll "hey, when a new conn comes in,
    > wake up one of us", poof this issue would be solved. However the
    > defined semantics for these interfaces says to wake everyone polling
    > on it up.

    Apache handles this very nicely. It runs a group of processes,
    and each *blocks* on accept(2). When a new connection comes in,
    the kernel wakes up one, which handles that socket alone, using
    blocking I/O (it uses alarm(2) to do timeouts).

    This way they avoid the poll/select issue entirely.

    [This applies to Apache 1.2, not sure about later versions]


    Richard Jones Tel: +44 171 598 7557 Fax: 460 4461
    Orchestream Ltd. 125 Old Brompton Rd. London SW7 3RP PGP:
    "boredom ... one of the most overrated emotions ... the sky is made
    of bubbles ..." Original message content Copyright © 1998

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to

     \ /
      Last update: 2005-03-22 13:43    [W:2.138 / U:0.012 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site