Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2000 10:05:52 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Jonas Bulow <jonas.bulow@servicefactory.se>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: freebsd and non-preemtive threads
Message-ID:  <Pine.BSF.4.21.0008171001210.43892-100000@resnet.uoregon.edu>
In-Reply-To: <3997C2C5.83AFE056@servicefactory.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 14 Aug 2000, Jonas Bulow wrote:

> I'm trying to build a preforked and threaded server. When it comes to
> the threading part it seems that non-preemtive threads have a lot of
> benefits if the server is a statefull-server. 
> 
> What I'm trying to say is that the server is not going to do a lot of
> computation for each request. The server will simply update it's state
> and respond about it's success. 

This reminds me of coroutines or userland select- or kqueue-based
"threading."  Coroutines is a bit more complex but a library is available.  
Select-based "threads" aren't too difficult to set up in C, you could use
http://www.nightmare.com/medusa, a Python implementation, as a starting
point.  Also most NNTP servers have been using techniques like this for
years.

The key to these types of systems is that they don't spend much time per
request.

Doug White                    |  FreeBSD: The Power to Serve
dwhite@resnet.uoregon.edu     |  www.FreeBSD.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0008171001210.43892-100000>