Date: Mon, 29 Mar 2004 23:41:45 +0300 From: Petri Helenius <pete@he.iki.fi> To: Niall Douglas <s_sourceforge@nedprod.com> Cc: freebsd-threads@freebsd.org Subject: Re: GDB 6.0 and FreeBSD threads Message-ID: <40688A09.9070709@he.iki.fi> In-Reply-To: <40688B80.18775.48ADA9C@localhost> References: <4067CC9B.8940.1A12F51@localhost> <40688B80.18775.48ADA9C@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
Niall Douglas wrote: >Here's a thought - surely on a M:N threading implementation the >kernel and user side library can automatically optimise which threads >don't need to be system scope? They could do this by maintaining a > > I would hate to see this happen. The added complexity and unpredictability would make implementations harder because you would have to account for an optimizer which tries to think what´s best for the crappy application/programmer who does not know what he wants. >sleep & i/o history for each thread, noting when which threads run >concurrently, which i/o dependencies exist between threads and from >that dynamically rescope the thread plus perform dynamic priority >boosting to minimise sleeps. Indeed, if the kernel scheduler felt it >was being overtaxed, more threads could be moved in-process. > > > Why not just run all threads SCOPE_PROCESS? Then the system will do that for you. >To me there is little point investing in all the complexity of a M:N >implementation if you don't implement such optimisation features - >otherwise the substantial amounts of extra code cause things to run >slower due to sheer binary size. Of course this subtly breaks POSIX > > The great advantage of process scope threads is the fact that you can hand over a mutex without going trough a process switch. Pete
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40688A09.9070709>