Summary of "Magma notes" issues

lex at cc.gatech.edu lex at cc.gatech.edu
Tue Jul 13 18:58:05 UTC 2004


tim Rowledge <tim at sumeru.stanford.edu> wrote:
> lex at cc.gatech.edu wrote:
> > 
> > 	http://impara.de/~bert/swiki.gsug.org/sqfixes/1277.html
> > 
> Why on earth do this in the VM? Much simpler in the image. Especially 
> if/when primitives could return error codes to help work out which if 
> the many possible problems might have occured - gosh, lookee here, I 
> happen to have some code ready for some future VM release.
> 


It makes a lot of sense to do this in the VM.  Here are some reasons, in
decreasing order of importance:
	
	1. The VM has a snapshot primitive, and surely that primitive should do
the Right Thing.  For Smalltalk, that means it should be safe.
	
	2. The exact technique used in my patch (i.e. save to foo.tmp, then
rename foo.tmp to foo) is not the only possible implementation.  The VM
should be able to use something better (e.g., leverage a transactional
filesystem) if such is available.

	3. It is simple to implement it in the VM.  Maye it's even simpler at
the image level, but it can't be by much; there isn't much code there to
begin with.
	
	4. It applies to existing images if you implement it in the VM.  Every
image I run suddenly has safe snapshots, even if I obtained that image
from someone else, and even if the image represents a project I started
years ago.
	
	5. It un-applies to all existing images, for people who decide to live
dangerously.  If I send you an image, you can run it with dangerous
snapshots just by configuring your VM appropriately; you don't have to
twiddle a preference in each image you run.

Given all this, why *not* do it in the VM?  I don't think it is simpler
when you look at the practical issues of upgrading images to use safe
saves.


-Lex



More information about the Squeak-dev mailing list