<div dir="ltr">Hi Ben,<div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 8, 2017 at 6:39 PM, Ben Coman <span dir="ltr"><<a href="mailto:btc@openinworld.com" target="_blank">btc@openinworld.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 6, 2017 at 10:44 PM, Guillermo Polito <span dir="ltr"><<a href="mailto:guillermopolito@gmail.com" target="_blank">guillermopolito@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi,<div><br></div><div>I was checking the code in sqUnixHeartbeat.c to see how the heartbeat thread/itimer worked. It somehow bothers me that there are different compiled artifacts, one per option.</div><div><br></div><div>What do you think about having a VM that manages that as an argument provided when we launch the VM? This would add some flexibility that we don't have right now because we make the decision at compile time.</div><div><br></div><div></div></div></blockquote><div><br></div><div>Can someone advise how to create a new VM setting and read/write to it from the Image?</div></div></div></div></blockquote><div><br></div><div>Give me an example of the kind of setting and I'll make you through it.  The kinds of settings I know about are:</div><div><br></div><div>1. has a command line keyword and argument to set it</div><div><br></div><div>2. has a persistent value stored in the image header and is set via vmParameterAt:[put:]</div><div><br></div><div>3. 1 + 2</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>As a challenge, I'd actually like to play with dynamically switching the heatbeat between threaded & timer while the Image is running. </div><div><br></div><div>Also it would be nice for the Image to be able to inspect what priorities the heatbeat thread is running at.</div></div></div></div></blockquote><div><br></div><div>Ugh :-(  That's a lot of plumbing.  Much easier to just put a printf in a custom version of the VM somewhere?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>As well, what is the simplest reliably crashing example of signal conflict with the timer-beat VM? <br></div></div></div></div></blockquote><div><br></div><div>There isn't a way that reliably crashes the Vm (it doesn't crash).  Instead I posted an example which should demonstrate the problem.  Here it is again.</div><div><br></div><div style="color:rgb(0,0,0);font-size:12.800000190734863px">[| infiniteLoop |</div><div style="color:rgb(0,0,0);font-size:12.800000190734863px">infiniteLoop := [| sum | sum := 0. [sum < 10] whileTrue: [sum := sum + (sum <span class="gmail-il">even</span> ifTrue: [1] ifFalse: [-1])]] newProcess.</div><div style="color:rgb(0,0,0);font-size:12.800000190734863px">infiniteLoop resume.</div><div style="color:rgb(0,0,0);font-size:12.800000190734863px">Processor activeProcess priority: Processor activePriority + 1.</div><div style="color:rgb(0,0,0);font-size:12.800000190734863px">(<span class="gmail-il">Delay</span> forSeconds: 1) wait.</div><div style="color:rgb(0,0,0);font-size:12.800000190734863px">infiniteLoop terminate.</div><div><span style="color:rgb(0,0,0);font-size:12.800000190734863px">Processor activeProcess priority: Processor activePriority - 1] timeToRun 1001</span></div><div><br></div><div><span style="color:rgb(0,0,0);font-size:12.800000190734863px"></span>Remember to test it on an older kernel which doesn't have the improved schedulers to confirm that the example locks up.</div><div>  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div><br></div><div>cheers -ben</div></div></div></div>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>