meeting-20080122jp

  • Date: 14:00 - 16:00 22th, Jan
  • Member: ko1, nobu

Assumption

  • Separate ObjectSpace each other.
    • Independent GC.
  • Each VMs run in parallel without any synchronization

MVM API (mostly Ruby Level API)

  • Create: VM.new (C: rb_vm_new ?)
  • Eval: VM#eval or VM.eval (=> VM.new.eval)
  • Communication
    • VM.parent: get creator VM object
    • VM#send, VM#recv
      • Sync? Async?
      • Send Proxy object? (like DRuby's model)
      • How about zombie VM/objects? (what should we do if object owner VM had exited?)
      • -> make zombie VM? cause exception when accessing zombie object?
      • Make Shared object? (-> implimentation issue/optimization)
    • Pipe based communication?
      • Subclass of IO?
    • Sharing some table like Linda model?
      • ex1: VM global table (shared with all VMs)) VM.[](sym), VM.[]=(sym, val)
      • ex2: VM local table (shared with VMs which have reference to VM) VM#[], VM#[]=.
 vm = VM.new
 vm.eval %q{
   obj = VM.parent.recv
   obj.foo # DRuby like proxy?
 }
 vm.send obj
  • "VM#start with block" is too difficult to implement (how about shared object via scope?). Ignore it (Future work?).

VM Creation

  • Options to create new VM
    • Environment Variables
    • ARGV
    • working directory
    • process id?
    • signal handling information (mask information)
    • safe level
    • class set? (to achieve sand box)
    • load path?
    • stdio (stdin, stdout, stderr)
      • Ruby level IO (on Ruby API)
      • System level file descriptor? (on C API)
  • How to pass above options?
    • argument of VM.new
    • post setting (vm = VM.new; vm.stdin = ...)

Signal Handling

  • Make "Universal Event Mechanism"

Object Space

  • Making SharedObjectSpace?
    • It's smart than zombie VM.
    • Shared objects are managed with Reference Counting
    • Sharing String feature can be used.
      • See "string.c" for detail.
    • Sharing immutable objects is easy to put shared object space.
    • 2 types proxy objects:
      • proxy to SharedObjectSpace.
      • proxy to another VM.
    • SharedObjectSpace is implementation/performance issue. maybe it's not needed to run mvm.
  • It's too difficult to share class/module object
    • Make "template" object
  • IDs should be shared objects
    • Because C extensions use IDs, store it in C global variables
    • It's necessary to use lock to accessing symbols. -> Performance Issue.
  • Shareing Objects is "optimization", so it can be postponed.

Another Topics

  • We need memory profiler (TODO)
  • We need sample applications.
  • Rubinius: we need to survey it. Are there good summary?
Last modified: 2008-01-24