You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Robinson <dr...@ast.cam.ac.uk> on 1996/01/08 16:19:00 UTC
Multi-threading (was Re: HTTP-ng, Anonymous and mSQL-Auth)
> > On Sat, 6 Jan 1996, sameer wrote:
> > > Is there a good reference on MT that I can look at? I don't
> > > have a very good clue on what multi-threadedness is all about.
> >
> > Dunno either. Who on the list has experience with writing multithreaded
> > applications?
>
> I have. Amongst others I have written an MT protocol stack, which seems kind
> of relevant.
Me too; I've written some MT multi-CPU numerical code.
> > Should we make a public call-out for help? I know there
> > are platform issues too, not all OS's do threading so Apache suddenly
> > becomes harder to port.
>
> Actually, in my experience, it isn't too hard to make an MT program work on
> an ST platform - if care is taken. So long as one is happy with the ST doing
> things sequentially, that is.
>
> Another alternative is to simulate threads with children on ST platforms.
> This would be the only way to get a nice HTTP-NG implementation on ST. It
> would mean abstracting the interface between threads, which is generally a
> good idea anyway, as it tends to avoid the nastier problems of MT.
>
> If Apache were MT, it wouldn't have to spawn children, would it?
Actually, it would. For reliability and security, it would always have
a parent and one child. It would be simple to allow more children; this
would be a good idea as there will be a limit on how many requests can be
handled in one process (a limit on file descriptors, for example),
It seems to me that NG would be optimally implemented as a UNIX device
driver; after setting up the connection you would use NG_accept() to wait
for a new request...
David.