MPS issue job003632

TitleDifficult to integrate with application that has non-atomic updates
Statusopen
Prioritynice
Assigned userRichard Brooksby
OrganizationRavenbrook
DescriptionThe MPS relies on formatted objects being scannable at all times after mps_commit() succeeds [1]. This means that all updates to objects much be atomic. However, in some cases it may be very difficult to arrange for this to be the case. A typical example is stretchy vectors, where the length of the vector and the vector itself must be updated at the same time. Now, stretchy vectors can in fact be updated atomically (by storing the vector's length in its first word) but in many integrations this will result in considerable rewriting of data structures and code. Much of the difficulty encountered in the Lua integration was to do with non-atomic updates.
AnalysisRB suggests that it may be possible to implement a cheap lock that prevents the MPS from scanning a structure in a region of code.
How foundinspection
Evidence[1] <https://www.ravenbrook.com/project/mps...guide/lang.html#maintaining-consistency>
Created byGareth Rees
Created on2013-10-01 16:01:59
Last modified byGareth Rees
Last modified on2013-10-01 16:01:59
History2013-10-01 GDR Created.