RE: 2.0.6 released

"Tikka, Sami" <[email protected]>
Newsgroups gmane.linux.dazuko.devel
Message-ID <[email protected]>
>-----Original Message-----
>From: [email protected] 
>[mailto:[email protected]
>] On Behalf Of Calin A. Culianu
>Sent: Sunday, March 27, 2005 6:57 PM
>To: [email protected]
>Subject: Re: [Dazuko-devel] 2.0.6 released
>
>Well you ensure there are free threads by keeping track of 
>which threads 
>are busy and which are idle.  You can define idle as a thread that is 
>sitting blockd inside dazukoGetAccess_TS().  Busy can be defined as a 
>thread that has a dazuko access and is in the process of servicing it.
>
>Anyway, if idle ever hits zero, create a new thread.  This 
>way, there are 
>never 0 idle threads for long.  Each new access that is being 
>serviced has 
>the potential for generating a new thread to service a future access. 
>This way the system can never hang..
>
>Oh.. and you need to check the idle and busy count on thread creation 
>and/or when threads transition to new states.
>
>That's my approach.. there probably are others...

This was also my original approach, except that I never allowed the number of
idle threads to reach zero. However, at one point in time something happened
and I started experiencing system freezes when new threads were started. I
did not investigate it any further. I just changed the code so that it sets
up 20 threads and the threads never die. 

-- 
Sami Tikka                tel. +358 9 2520 5115 
senior software engineer  fax. +358 9 2520 5014
                          mobile +358 40 7379388
F-Secure Corporation      http://www.f-secure.com
BE SURE
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.