Friendly and Efficient Message Handling

  • Authors:
  • R. A. F. Bhoedjang;K. G. Langendoen

  • Affiliations:
  • -;-

  • Venue:
  • HICSS '96 Proceedings of the 29th Hawaii International Conference on System Sciences Volume 1: Software Technology and Architecture
  • Year:
  • 1996

Quantified Score

Hi-index 0.00

Visualization

Abstract

Since communication software spends a significant amount of time on handling incoming messages, it is desirable that message handlers avoid expensive context-switches on frequently executed paths. High-performance Active Message systems demand that handlers run to completion without blocking. Unfortunately, disallowing all blocking in handlers makes it hard to integrate them into large, preemption-based systems, because each potentially blocking action, including library calls, must be rewritten.We have implemented a portable, hybrid upcall mechanism that is easier to use than Active Messages yet avoids unnecessary thread switching. The key idea is that message handlers are only allowed to block on locks protecting shared data. Inside message handlers, blocking on synchronous communication and condition variables is not allowed. This restriction allows most messages to be processed without unnecessary thread switching on the critical path. When a message handler has to suspend its work, it explicitly creates a continuation.We have added hybrid upcalls to the runtime system of Orca, an object-based Distributed Shared Memory system. By removing a thread switch from the critical path, remote object invocation latencies dropped by 300 microseconds. By by building application-specific continuations rather than blocking a thread, we significantly reduced memory consumption by the Orca RTS. Finally, fewer undesired thread preemptions occur, because most messages are handled by a single thread.