<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Well, there is no formal specification… But I could summarize the features as follows (and as Christophe points mostly out)<div class=""><br class=""></div><div class="">OzVM supports having two images in logically separated spaces. This separation is achieved by using the free bit in the object header. Thus we support only two spaces by now.</div><div class=""><br class=""></div><div class="">- The main addition is actually a new primitive: #resumeFromSpecialObjectsArray that receives an special objects array as argument and:</div><div class="">&nbsp; &nbsp; - resumes the execution from the active process of such array</div><div class="">&nbsp; &nbsp; - on context switch, if the VM is running from a second special objects array, it will return to the first one instead.</div><div class=""><br class=""></div><div class="">- fixes to primitives/bytecodes that assume a single special objects array. e.g.,</div><div class="">&nbsp; &nbsp;- #someObject and #nextObject should only iterate objects from the correct “space”</div><div class="">&nbsp; &nbsp;- #isNil comparisons should take the correct nil</div><div class="">&nbsp; &nbsp;- the GC should set the correct nil object on Weak containers</div><div class=""><br class=""></div><div class="">The extensions I made are about 20 overrides to StackPrimitive and NewObjectMemory methods.</div><div class=""><br class=""></div><div class="">The rest is implemented completely on image side. We use mirror primitives to manipulate objects from other space (as each image/space has it’s own selector table).</div><div class=""><br class=""></div><div class="">I have in my long TODO list see if the "clever hack” I did can be supported in a nice manner on top of Spur’s segmented memory. However, I should stop commencing new projects and start finishing them :P.</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 20 ene 2016, at 9:03 a.m., Christophe Demarey &lt;<a href="mailto:Christophe.Demarey@inria.fr" class="">Christophe.Demarey@inria.fr</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class="">Hi Eliot,<div class=""><br class=""></div><div class=""><div class=""><div class="">Le 19 janv. 2016 à 19:29, Eliot Miranda a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite" class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Hi All,</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; great news! &nbsp;Where can I read a specification of the Oz VM facilities?<br class=""></div></div></blockquote><div class=""><br class=""></div>I do not know all the details of the Oz VM but basically, it is a standard stack interpreter vm specialized to be able to run 2 images at the same time on top of it.&nbsp;</div><div class="">Guillermo made it possible by using&nbsp;one available bit in the object header of objects to mark the ownership of an object (e.g. is my object from image1 or image2?). Then, he mainly had to specialize VM primitives dealing with objects retrieval from memory. By example, he had to modify the garbage collector to set the right nil instance (yes, we have 2 images so 2 nil instances. we need to take the one of the active image) when an object is garbage collected; the primitive someObject has to return an object from the active image, etc.</div><div class="">There is also a way to switch execution from an image to the other just by switching the special objects array reference.&nbsp;</div><div class=""><br class=""></div><div class="">You can find some information in:&nbsp;<a href="https://guillep.github.io/files/publications/Poli15Thesis.pdf" class="">https://guillep.github.io/files/publications/Poli15Thesis.pdf</a>.</div><div class="">The Oz code is in&nbsp;<a href="http://smalltalkhub.com/#!/~Guille/ObjectSpace" class="">http://smalltalkhub.com/#!/~Guille/ObjectSpace</a> and in&nbsp;<a href="https://github.com/guillep/OzVM" class="">https://github.com/guillep/OzVM</a></div><div class="">The current implementation uses&nbsp;Cog &nbsp;6.6.1and&nbsp;OzVM-GuillermoPolito.22.<div class="">I do not know if Guille has a more formal specification of the Oz VM.</div><div class=""><br class=""></div><div class="">If you have advices on what is the best way to handle two distinct object (memory) spaces in Spur, they will be welcomed :)</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Christophe</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div dir="auto" class=""><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">_,,,^..^,,,_ (phone)</span></div><div class=""><br class="">On Jan 19, 2016, at 6:29 AM, Christophe Demarey &lt;<a href="mailto:christophe.demarey@inria.fr" class="">christophe.demarey@inria.fr</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div class="">Hi all,<div class=""><br class=""></div><div class="">In case you do not know, we work on bootstrapping Pharo, i.e. create a Pharo image from sources, not based on a previous image (well, we use a pharo image to produce it but no code / state from it).</div><div class=""><br class=""></div><div class="">This process will allow to define a minimal Pharo kernel (currently 52 packages but we could have it far smaller) and to modularize the whole image (currently packages have too much dependencies on packages already loaded into the image).</div><div class="">The bootstrap process also allows to write down the recipe to initialize a new image from scratch (some code is missing in the image or is wrong). In addition, I think we will clean a lot of historical objects that are not used anymore.</div><div class=""><br class=""></div><div class="">With the amazing work done by Guillermo Polito during his Phd (around Espell, Oz):&nbsp;<a href="https://guillep.github.io/files/publications/Poli15Thesis.pdf" class="">https://guillep.github.io/files/publications/Poli15Thesis.pdf</a>,&nbsp;<b class="">we succeeded to get a first prototype of a bootstraped Pharo 5 image (from 5.392)</b>.</div><div class="">This prototype is able to run an eval command line handler and to log output / errors. Not all classes are yet initialized and you cannot yet save / restart this image but it is a big step forward.</div><div class="">It is a 4 mb image (could be half the size without unicode data). You can download it at:&nbsp;<a href="http://chercheurs.lille.inria.fr/~demarey/pmwiki/pub/pharo-bootstrap/pharo-bootstrap.zip" class="">http://chercheurs.lille.inria.fr/~demarey/pmwiki/pub/pharo-bootstrap/pharo-bootstrap.zip</a>.</div><div class=""><br class=""></div><div class="">Next steps are to have a bootstrapped image fully working, then to load packages on top of it (like network, sunit) to produce a minimal image.</div><div class="">Then, we need to implement an Oz VM on top of Spur.</div><div class="">After that, we need to work on a reliable way to build the bootstrap (not too sensitive to changes in the image).</div><div class=""><br class=""></div><div class="">Christophe.</div></div><div class=""><br class=""></div><div class=""><div class="">-------</div><div class=""><div class="">demarey@193-51-236-143:~/dev/rmod/bootstrap/bootstrap-2016-01-19$ ../pharo bootstrap.image --no-default-preferences eval "1 + 1"</div><div class="">2</div><div class="">demarey@193-51-236-143:~/dev/rmod/bootstrap/bootstrap-2016-01-19$ ../pharo bootstrap.image --no-default-preferences eval "'a' , 'b'"</div><div class="">'ab'</div><div class="">demarey@193-51-236-143:~/dev/rmod/bootstrap/bootstrap-2016-01-19$ ../pharo bootstrap.image --no-default-preferences eval "1 / 0"</div><div class="">ZeroDivide</div><div class="">SmallInteger&gt;&gt;/</div><div class="">UndefinedObject&gt;&gt;DoIt</div><div class="">OpalCompiler&gt;&gt;evaluate</div><div class="">OpalCompiler(AbstractCompiler)&gt;&gt;evaluate:</div><div class="">SmalltalkImage&gt;&gt;evaluate:</div><div class=""><br class=""></div><div class="">EvaluateCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class="">no source in EvaluateCommandLineHandler&gt;&gt;evaluate: in Block: no source</div><div class="">BlockClosure&gt;&gt;on:do:</div><div class="">EvaluateCommandLineHandler&gt;&gt;evaluate:</div><div class="">EvaluateCommandLineHandler&gt;&gt;evaluateArguments</div><div class="">EvaluateCommandLineHandler&gt;&gt;activate</div><div class="">EvaluateCommandLineHandler class(CommandLineHandler class)&gt;&gt;activateWith:</div><div class=""><br class=""></div><div class="">BasicCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class="">no source in PharoCommandLineHandler(BasicCommandLineHandler)&gt;&gt;activateSubCommand: in Block: no source</div><div class="">BlockClosure&gt;&gt;on:do:</div><div class="">PharoCommandLineHandler(BasicCommandLineHandler)&gt;&gt;activateSubCommand:</div><div class="">PharoCommandLineHandler(BasicCommandLineHandler)&gt;&gt;handleSubcommand</div><div class="">PharoCommandLineHandler(BasicCommandLineHandler)&gt;&gt;handleArgument:</div><div class=""><br class=""></div><div class="">BasicCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class="">no source in PharoCommandLineHandler(BasicCommandLineHandler)&gt;&gt;activate in Block: no source</div><div class="">BlockClosure&gt;&gt;on:do:</div><div class="">PharoCommandLineHandler(BasicCommandLineHandler)&gt;&gt;activate</div><div class="">PharoCommandLineHandler&gt;&gt;activate</div><div class="">PharoCommandLineHandler class(CommandLineHandler class)&gt;&gt;activateWith:</div><div class=""><br class=""></div><div class="">PharoCommandLineHandler class&gt;&gt;no (source is Undeclared)&nbsp;</div><div class="">no source in PharoCommandLineHandler class&gt;&gt;activateWith: in Block: no source</div><div class="">NonInteractiveUIManager(UIManager)&gt;&gt;defer:</div><div class="">PharoCommandLineHandler class&gt;&gt;activateWith:</div><div class="">no source in BasicCommandLineHandler&gt;&gt;activateSubCommand: in Block: no source</div><div class="">BlockClosure&gt;&gt;on:do:</div><div class="">BasicCommandLineHandler&gt;&gt;activateSubCommand:</div><div class="">BasicCommandLineHandler&gt;&gt;handleSubcommand</div><div class="">BasicCommandLineHandler&gt;&gt;handleArgument:</div><div class="">no source in BasicCommandLineHandler&gt;&gt;activate in Block: no source</div><div class=""><br class=""></div><div class="">SmallInteger&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">UndefinedObject&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">AbstractCompiler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">SmalltalkImage&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">BlockClosure&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">EvaluateCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">EvaluateCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">CommandLineHandler class&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">BasicCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">BasicCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">PharoCommandLineHandler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">UIManager&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">UndefinedObject&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">CommandLineUIManager&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">SmalltalkImage&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">DelayMicrosecondScheduler&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">BlockClosure&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">SmalltalkImage&gt;&gt;no (source is Undeclared)&nbsp;</div><div class=""><br class=""></div><div class="">WeakArray class&gt;&gt;no (source is Undeclared)&nbsp;</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">ps: source cannot be displayed because there is no formatter available in the bootstrap</div><div class=""><br class=""></div><div class=""></div></div></div></blockquote></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>