language: en

User-Level Threads and Interprocess Communication

Michael J. Feeley, Jeffrey S. Chase, and Edward D. Lazowska
Department of Computer Science and Engineering, FR-35 University of Washington
Seattle, WA 98195
Technical Report 93-02-03

Abstract User-level threads have performance and flexibility advantages over both Unix-like processes and kernel threads. However, the performance of user-level threads may suffer in multipro-grammed environments, or when threads block in the kernel (e.g., for I/O). These problems can be particularly severe in tasks that communicate frequently using IPC (e.g., multithreaded servers), due to interactions between the user-level thread scheduler and the operating system IPC primitives. Efficient IPC typically involves processor handoff that blocks the caller and unblocks a thread in the callee; when combined with user-level threads, this can cause problems for both caller and callee, particularly if the caller thread should subsequently block. In this paper we describe a new user-level thread package, called OThreads, designed to support blocking and efficient IPC for a system based on traditional kernel threads. We discuss the extent to which these problems can be solved at the user level without kernel changes such as scheduler activations. Our conclusion is that problems caused by application-controlled blocking and IPC can be resolved in the user-level thread package, but that problems due to multiprogramming workload and unanticipated blocking such as page faults require kernel changes such as scheduler activations.

1 Introduction