Skip to content
Jim Cadden edited this page May 23, 2013 · 4 revisions

Concurrency on ebb creation

Problem: Root construction may make ebb calls, hit a deadlock. Current implementation acquires a lock for both root and factory table.
Proposed Solution: While loop, locks (or compare-and-swaps) on table lookups. Upon first construction, a placeholder is inserted into the root table

Synchronous Inter-node calls

Three options:

  1. No synchronous operations, wasteful spinning/polling structures to adhere behavior to system called defined to be synchronous (e.g., write)
  2. Preemptive threading (too large)
  3. Coarperative threading. Each event consists of an interrupt and an execution context. We are allowed to block a context, allowing an additional context to execute, while is synchronous operation is being processes. An context can be yielded (saved) with the event manager, with the intention that the context get be restored during a different context (e.g., the arrives of writes' "ack" message)

Process of Dynamic Ebb Construction / Initial Miss

The following steps occur when the first non statically constructed ebb is defined and then called:

  1. Define a new ebb named enet of Ebb type Ethernet
    Ebb<Ethernet> enet (ebb_manager->allocateID())
  2. Bind ebb to an root construction "factory"
    ebb_manager->bind(virtio::construct_root, enet)
  3. Make an ebb call
    enet->AllocateBuffer()
  4. Call will miss on local translation table and end up in lrt::_trans_precall(), which in turn will call the installed miss handler.
  5. The default miss handler will resolve to InitRoot::PreCall
  6. The call will again miss, this time on the initial (primative) root table that contains the statically constructed ebbs. This will require a call to ebb_manager->Install()
  7. If this is the first install, the ebb_manager will need to lock, allocate local data structures, copy over primative root table entries, and construct the root.
  8. Finally, the constructed ebb root of enet will root->PreCall which will cache the rep into the local translation table, avoiding further misses.