MIT Department of Electrical Engineering & Computer Science

E E C S

Lazy Threads: Compiler and Runtime Foundations for Multi-Threading

Seth Goldstein
University of California, Berkeley

Monday, March 18, 1996
4:00 PM (3:45 refreshments)
Room NE43-518
EECS Special Seminar

Abstract

Many modern parallel languages support dynamic creation of threads or require multithreading in their implementations. The threads describe the logical parallelism in the program. There are many reasons why programmers and language implementors want the logical parallelism to exceed the physical parallelism of the machine, including ease of expression and better resource utilization in the presence of synchronization delays, load imbalance, and long communication latency. This naturally leads to applications with many fine-grained threads. In practice, however, most of the logical threads do not actually need to be independent threads. Instead, they could be run as sequential calls, which are inherently cheaper than independent threads. The challenge is that one cannot generally predict which logical threads can be implemented as sequential calls.

In this talk I will describe Lazy Threads, a new approach to implementing multithreaded execution on conventional machines. Each parallel call begins execution sequentially (with the attendant efficient stack management and direct transfer of control and data). Only if a call truly must execute in parallel does it get its own thread of control. We develop an abstract machine that allows us to efficiently implement lazy multithreading without explicit bookkeeping, shared memory, stack splitting, or restrictions on the use of pointers. We introduce a new storage model, Stacklets, that allows parallel calls to maintain the invariants of sequential calls. We combine this with a new control model, which allows tasks to "steal" the thread of control from their parent task. This abstract machine allows the compiler to specialize the representation of each parallel call based on the context in which it appears.

Lazy Threads has been incorporated into an explicitly parallel extension of Split-C, has been used as a compiler target for the functional language Id90, and is being incorporated into object-oriented languages. These systems demonstrate that Lazy Threads is an efficient substrate for both explicit and implicit parallel languages and reveals interesting new compile-time/run-time tradeoffs. In this talk, I will also compare Lazy Threads with other multithreading approaches.

HOST: Prof. Barbara Liskov


URL of this page: http://www-eecs.mit.edu/AY95-96/events/32.html
Created: Mar 18, 1996  | Modified: Jun 25, 1997
This announcement is from the MIT EECS 1995-96 archive.  | Current events
To MIT EECS home page  | Your comments and inquiries are welcome.