<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks again Eliot,<div><br></div><div>First, I solved the pthreads problem under OpenSolaris. While Solaris 10 doesn’t need special user privileges for thread control (at least within the same thread policy I guess),</div><div>users under Solaris 11 (and thus OpenSolaris) need the privilege „proc_priocntl“ to be given by an administrator.</div><div>(For those who are interested: usermod -K defaultpriv=basic,proc_priocntl andreas)</div><div><br></div><div>More below…</div><div><br><div><div>Am 22.04.2014 um 22:31 schrieb Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 22, 2014 at 1:10 PM, Andreas Wacknitz <span dir="ltr">&lt;<a href="mailto:a.wacknitz@gmx.de" target="_blank">a.wacknitz@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">&nbsp;<br><div style="word-wrap:break-word"><br><div><div>Am 22.04.2014 um 21:36 schrieb Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;:</div>
<br><blockquote type="cite"><div dir="ltr">Hi Andreas,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 22, 2014 at 12:05 PM, Andreas Wacknitz <span dir="ltr">&lt;<a href="mailto:a.wacknitz@gmx.de" target="_blank">a.wacknitz@gmx.de</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><br>
This evening I further dealt with the problems on OpenSolaris (openindiana).<br>
I finally got a pthread version running without superuser rights. But I don’t know whether this will really work (ATM it does for me)<br>
because I removed the call to pthread_setschedparam in beatStateMachine leaving the heartbeat thread with the same<br>
priority than the vm thread. </blockquote><div><br></div><div>Alas, that will not work -(. &nbsp;As soon as the image enters into a hard loop (e.g. [true] whileTrue) the heartbeat thread will be blocked and the VM will never break out of the loop.</div>
</div></div></div></blockquote><div><br></div>How can I check this blockage? I started the VM with --pollpipe 1 and then [true] whileTrue in a Workspace. The GUI is blocked but the pipe is still rotating.</div></div></blockquote>
<div><br></div><div>Can you interrupt with ctrl-period? &nbsp;If not, then I don't understand how the pip is still rotating :-). &nbsp;If you can, then you're not blocking the system. &nbsp;Try e.g. [[true] whileTrue] &nbsp;forkAt: Processor highestPriority.</div></div></div></div></blockquote>Yes, I can do that in both (with and without higher priority) BUT not when running this with highestPriority (again in BOTH versions!).</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div><br></div><div>You are running the JIT right?</div></div></div></div></blockquote>How to tell for sure? I started the VM with —trace. The last log is „IRBytecodeGenerator&gt;&gt;from:goto“.</div><div>The pipe is still rotating but ALT-. does not break the loop (maybe a problem of my Pharo image?; I will try later with a Squeak image).</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap:break-word"><blockquote type="cite">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">I tried to replace the pthread_setschedparam call with a similar pthread_setschedprio call but<br>

with no luck (same problem: failed call with "Not owner"). I don’t know wether this is a general problem with the pthreads implementation<br>
on Solaris or just a problem with the gcc version (4.4.4) coming with the openindiana distribution I am using. Maybe this works only<br>
with the compilers and libraries that is delivered by Oracle (Solaris 10 ships with gcc 3.4.3; Solaris Studio has its own compilers).<br></blockquote><div><br></div><div>It's too do with pthreads. &nbsp;Nothing to do with the compiler. &nbsp;On some implementations it requires special permission to create threads with different priorities. &nbsp;That used to be the case on linux and it appears to be the case on OpenSolaris. &nbsp;Hence one is stuck with the itimer heartbeat.</div>
</div></div></div></blockquote>Is there any implementation actually using sqUnixITimerHeartbeat.c? </div></blockquote><div><br></div><div>Yes, but unhappily. &nbsp;We use it at Cadence because we have customers on pre 2.6.12 kernels. &nbsp;We have to e.g. switch off the heartbeast around certain external calls.</div></div></div></div></blockquote>I am still wondering about where the necessary sleep call will be generated in this case. I will check your latest VM sources. Maybe PharoVM is different here…</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap:break-word"><div>I don’t think that Solaris has special problems here.</div><div>Also, I cannot imagine that this situation is so uncommon that nobody else got it before SqueakVM. A higher prioritized thread should be possible for ordinary users.</div>
</div></blockquote><div><br></div><div>I definitely wasn't the case on linux.</div><div><br></div></div></div></div></blockquote>I haven’t tried to build the VM for Solaris 10 yet but I have tried a multi-threaded example program I found in the web. This example program is running 4 threads for computation</div><div>and does not run under OpenSolaris (same error code like the SqueakVM is generating) but it runs without hassles on Solaris 10 SPARC. So I guess Solaris 10 will run the</div><div>two-threaded SqueakVM without problems.</div><div><br></div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"></div></div></div></blockquote></div>Best regards,</div><div>Andreas</div><div><br></div></body></html>