It should be pointed out that KeyKOS resume keys could, like
proper tail-call optimization, eliminate the ability to "walk
the stack" to determine the caller. In KeyKOS, the process had
direct control over usage of the resume key. It could pass it to
an object is was "calling" in place or creating a resume key to
itself with a normal call. This loss of ability to walk the
stack is much like tail-call optimization of:
function a(args) {
... some calculation
return b(otherargs);
}
Where the optimization passes the address of a's caller as the
return address for b and b can't see a's activation record on
the stack.
Cheers - Bill
On 3/9/13 at 6:57 PM, erig...@google.com (Mark S. Miller) wrote:
Another way to view the phrase "debugging API" is "properly stratified
privileged reflection API". Indeed, the famous Mirrors paper used JPDA as
an example of a properly stratified reflection system. The key thing about
debugging APIs is they get the privilege separation right -- because they
must. A well designed mirror system or mirror-like system could as well. I
have discussed this repeatedly with the co-authors of that paper -- Dave
Ungar and Gilad Bracha (cc'ed) -- and IIRC they enthusiastically agree. The
KeyKOS operating system had an operation for rights-amplifying a "start
key" or "resume key" to a "domain key". In our terms, a start key is like a
closure reference and a domain key is like a reference to the reified
lexical environment captured by that closure, i.e., a mirror on the state
of that closure. A resume key is like a continuation, so reflecting on
resume keys -- if you have the privileges needed to do so -- enables one to
effectively walk back the stack of outstanding IPC requests. The logic by
which KeyKOS (and its descendants EROS, CapROS, GuardOS, Coyotos) managed
the right-to-reflect could be a good starting point for doing likewise with
language-based mirrors.
-----------------------------------------------------------------------
Bill Frantz | Concurrency is hard. 12 out | Periwinkle
(408)356-8506 | 10 programmers get it wrong. | 16345
Englewood Ave
www.pwpconsult.com | - Jeff Frantz | Los Gatos,
CA 95032
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss