Date: Wed, 20 Dec 2000 06:51:58 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: Andy Newman <andy@silverbrook.com.au> Cc: stable@FreeBSD.ORG Subject: Re: misc/23679, pthreads and sleep times Message-ID: <Pine.SUN.3.91.1001220064540.446A-100000@pcnet1.pcnet.com> In-Reply-To: <200012200507.eBK57Gf30708@bebop.silverbrook.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 20 Dec 2000, Andy Newman wrote: > While getting Doug Schmidt's ACE & TAO up and running on RELENG_4 I ran > into a curious problem with sleep time calculations and libc_r. One of > ACE's test programs - Process_Mutex_Test - uses SysV semaphores for > inter-process synchronization (funny that). It forks a number of > children which grab the semaphore, do some work, release the semaphore > and exit. Work is simulated by sleeping for two seconds so the overall > run-time should be in the order the number of children. Semaphores are not wrapped by the threads library. You cannot use them reliably in our threaded environment as they will block the entire process. > I noticed that this test didn't seem to finish. A little > investigation showed each child was actually sleeping for 2**N (plus a > constant :) seconds, N being the ordinal number of the child in the > fork loop. I've recreated the test case (attached to report) and > tracing it's system calls shows the timeouts being passed to poll() > from the thread scheduler are wrong. Yes I aware the timeouts are not > guaranteed however I doubt the behaviour I'm seeing is actually desired. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001220064540.446A-100000>