[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [apache-plusplus] Applications for HTTP servers (was "Process model for C++ Apache")





On Thu, 28 May 1998, Bret wrote:

> 	Okay, I've returned from la-la land and have made an attempt to catch
> up... but before I can do so, somebody beats me to the punch.  This may 
> 
> >> If fibers can not be spread across multiple CPUs, isn't there
> >> a good possibility that a process with many fibers (say 300)
> >> will be starving many of its fibers since the process is
> >> competing for CPU (one CPU at a time) with all the other
> >> processes in the system?
> >
> >There's another aspect to http requests... they generally don't require a
> >lot of computing time in userland... most of what they do is tell the
> >kernel to send some bytes somewhere.  The user-level threads packages
> >generally context switch immediately when a write/read would block.  Then
> >they'll work a bit on another request, and maybe switch again... a bunch
> >can happen within one kernel context-switch.
> 
> 	Is this the case for hybrid systems as well?  I was under the impression
> that they amount to basically a mapping 'twixt user-level threads and
> kernel-threads, so I wouldn't expect to see the same problems... is that
> actually the case?
> 	As I understand it, Michael, the problem you refer to can happen when
> _only_ fibers are used.  I believe hybrid systems can compensate somewhat,
> perhaps at the cost of many context-switches... but I thought this was not
> the case.  Dean, can you help out here?

They're an MxN mapping -- M doesn't have to be the same as N.  It's a
multiplexing operation between user-level threads and kernel-level
threads.  So it's still the case.

Dean