Summary of "Magma notes" issues
tim Rowledge
tim at sumeru.stanford.edu
Wed Jul 14 00:07:59 UTC 2004
lex at cc.gatech.edu wrote:
>
> 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.
That's actually an interesting argument. For example one could claim
that it already is safe since it doesn't alter the in-memory image and
so you can always recover.
>
> 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.
I think both the above leave me thinkgin image code is better. VM code
should be as simple as possible and provide barest-reasonable mechanism;
the snapshot prim doesn'y do all the socket suspending, file closing etc
, we do that in the image. Likewise, I'd prefer the image to handle any
returned error from snapshotting, deal with transactional filesystems,
full discs, cosmic ray hits and poor fashion choices.
>
> 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.
Hmm, good point.
>
> 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.
Not such a good point in my opinion; why add still more complexity in
the VM. The damn thing is already too intertwinglulisationated so please
let us not add more.
Whatever we decide, it isn't urgent since nothing is about to be changed
in the VM until after 3.7 is out. Time to think about it.
tim
More information about the Squeak-dev
mailing list
|