<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Thanks.<br><br>jbook2:thread jay$ ./I386_DARWIN/threadtest <br>Writing file...done<br>Creating read threads...done<br>Creating fork threads...done<br>Creating alloc threads...done<br>Creating lock threads...done<br>running...printing oldest/median age/newest<br>..........laziest thread is 1/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 1/0/0 lock 1/1/1)<br>..........laziest thread is 1/0/0 (tests: read 1/0/0 fork 1/1/0 alloc 0/0/0 lock 0/0/0)<br><br>those aren't errors, right?<br><br>I can reproduce problems on Darwin -- assertion failures, errors in ThreadPThreadC.c like EBUSY and I think EINVAL.<br> EBUSY is from pthread_mutex_destroy, which means we are freeing a mutex while it is locked, which means<br> there is a problem. Such as the garbage collector collecting non-garbage. It ccould be something else though.<br><br>I'm trying with user threads. User threads do print the above. But so far has a longer runtime than with pthreads,<br> hasn't hit any SIGSEGV or assertion failure or anything yet.<br><br>I do wonder .. oh, and then w/ user threads:<br><br>All tests complete. Congratulations.<br><br>I do wonder about scheduling order and when the preemptions occur.<br>For example user threads does offer Disable/EnableScheduling.<br>Maybe the timeslices vary a lot and userthreads preempt a lot less?<br>Maybe we can try w/ tuning the user thread timeslice to match whatever pthread uses on whatever platform (<br>there likely no guarantee or documentation, but for experimental purposes we can likely figure it out<br>experimentally).<br><br>It will be interesting to see the results on Windows too. I'll probably try that right away.<br><br> - Jay<br><br>> To: rcolebur@SCIRES.COM<br>> Date: Sat, 26 Feb 2011 10:10:44 -0800<br>> From: mika@async.caltech.edu<br>> CC: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] results of threadtest program on Windows7<br>> <br>> <br>> Hi Randy,<br>> <br>> I just implemented Jay's suggestion for removing the dependency on the<br>> external program "sleep". You can CVS update and try again now.<br>> <br>> Mika<br> </body>
</html>