Flash memories (was: Modules)

Jecel Assumpcao Jr jecel at merlintec.com
Wed Mar 2 13:26:39 UTC 2005


Dan,

thanks for you examples and comments on my comments. Here are something
things I thought while reading your "Getting Ready" message:

> Think about a little PDA with ROM and RAM.¾ Suppose we blew the
> squeak image in to the ROM.¾ Could we run with it in ROM?
>¾When we wanted to save, could we only save the differences
> from the ROM?¾ If we started it up again, and made some more
> changes, could we just save those changes? What do these
> incremental snapshots suggest about modules?

When you used Compact Flash cards with the SqueakBox, you probably let
the underlying Linux file system deal with the nasty details. And they
are nasty: you can only erase whole blocks (typically 64KB) at a time
and any given word can only be reprogrammed a certain number of times
(10,000 or so). So you have to detail with parts slowly going bad and/or
try to spread out writes as much as you can.

Writing a new image, erasing the old one and then renaming the new to
have the old name isn't a good way of dealing with Flash. You ping pong
between two areas while leaving the rest of the memory untouched. Even
worse: nearly all of the content that has just been written is identical
to what was previously erased to make room for it.

Just dividing the system into a bulk read-only part and a changes part
would be a big help. The changes could grow and grow until there was not
enough room left and then a new read-only part could be created
compressing all the changes (with a new, empty changes part). This would
reduce the write rate to individual words by a factor of ten or more.
Splitting this further into modules would be even nicer, but you would
have to take into account the the typical module would be smaller than
the Flash block.

> Now imagine that the VM can have multiple method caches, one per,
> um, per process?¾ per module?¾ Think about it.¾ And when you have
> figured it out, note that this system could run simultaneous multiple
> projects with conflicting changes to root classes with no performance
> degradation.

One cache per PIE viewpoint would be great. A single process might want
to switch viewpoints once in a while.

-- Jecel
P.S.: should I add something about Neo Smalltalk "modules" to the swiki
page? All the other systems there are real and this is just a paper
design, so it didn't seem proper to me.



More information about the Modules mailing list