Subj : Re: I still need use function thr_setconcurrency in Solaris9? To : comp.programming.threads From : David Butenhof Date : Fri Mar 04 2005 04:21 pm David Schwartz wrote: > "Franklin Li" wrote in message > news:d095uu$h1@netnews.proxy.lucent.com... > >>From book "Programming with Posix threads", I need use function >>thr_setconcurrency. But it's in Solaris 2.5. For Solaris9, I still need >>use >>this function? From my testing, it seems no necessary. If necessary, could >>you tell me the reason? > > It's generally not necessary unless you have a lot of threads that are > only doing computation (not I/O). Does it still even DO anything on Solaris 9? I'd be surprised, since threads aren't multiplexed. (Ironic, in a way, since it was only Sun fighting to standardize this stupid function because they weren't willing to not need it at the time. ;-) ) In particular, the principal usage in the book was to ensure concurrency between competing threads to demonstrate race conditions. THAT is definitely not relevant on Solaris 9, which is perfectly capable of demonstrating the race conditions without a "nudge" from the application. This, in fact, is the main reason they changed the thread library implementation: Sun had no will (they certainly had the means) to repair the fundamental weaknesses in their 2-level scheduler, and chose instead to eliminate it. (Other 2-level scheduling implementations, including Tru64 UNIX and HP-UX, have avoided those weaknesses; and the solutions were nothing that Sun couldn't have duplicated had they wanted to.) -- Dave Butenhof, David.Butenhof@hp.com HP Utility Pricing software, POSIX thread consultant Manageability Solutions Lab (MSL), Hewlett-Packard Company 110 Spit Brook Road, ZK2/3-Q18, Nashua, NH 03062 .