Author dabeaz
Recipients DazWorrall, aconrad, alex, andrix, brian.curtin, carljm, coderanger, cool-RR, dabeaz, djc, durin42, eric.araujo, eric.smith, flox, gregory.p.smith, jcea, jhylton, karld, kevinwatters, konryd, larry, loewis, mahmoudimus, movement, neologix, nirai, pitrou, rcohen, rh0dium, salgado, tarek, thouis, ysj.ray
Date 2010-04-26.11:08:45
SpamBayes Score 2.70831e-11
Marked as misclassified No
Message-id <1272280127.79.0.530665801616.issue7946@psf.upfronthosting.co.za>
In-reply-to
Content
Greg,

I like the idea of the monitor suspending if no thread owns the GIL.  Let me work on that.   Good point on embedded systems.

Antoine, 

Yes, the gil monitor is completely independent and simply ticks along every 5 ms.   A worst case scenario is that an I/O bound thread is scheduled shortly after the 5ms tick and then becomes CPU-bound afterwards.  In that case, the monitor might let it run up to about 10ms before switching it.  Hard to say if it's a real problem though---the normal timeslice on many systems is 10 ms so it doesn't seem out of line.  

As for the priority part, this patch should have similar behavior to the glinter patch except for very subtle differences in thread scheduling due to the use of the GIL monitor.  For instance, since threads never time out on the condition variable anymore, they tend to cycle execution in a purely round-robin fashion.
History
Date User Action Args
2010-04-26 11:08:47dabeazsetrecipients: + dabeaz, loewis, jhylton, gregory.p.smith, jcea, pitrou, movement, larry, eric.smith, kevinwatters, tarek, djc, karld, carljm, coderanger, durin42, eric.araujo, nirai, alex, andrix, konryd, brian.curtin, flox, DazWorrall, salgado, cool-RR, rh0dium, rcohen, mahmoudimus, aconrad, ysj.ray, neologix, thouis
2010-04-26 11:08:47dabeazsetmessageid: <1272280127.79.0.530665801616.issue7946@psf.upfronthosting.co.za>
2010-04-26 11:08:46dabeazlinkissue7946 messages
2010-04-26 11:08:46dabeazcreate