Controlling Kernel Scheduling from User Space: An Approach to Enhancing Applications' Reactivity to I/O Events

In this paper, we present a sophisticated mechanism that allows an application to tightly control the way I/O events are handled within the underlying operating system’s kernel. The goal is to provide an efficient user-level interface to allow applications to quickly detect and handle asynchronous I/O events. Reactivity is obviously a crucial property for many time-critical applications. For instance, it is a major issue in distributed applications where poor reactivity to communication events may have a direct influence on the observed latency of communications, and may even impact on the whole application behavior. Our approach is based on an extension of the Scheduler Activation kernel scheduling model, originally proposed by Anderson et al. The idea is to minimize the time elapsed between the detection of an I/O event within the kernel and the scheduling of the appropriate user-level thread within the application. The progress of I/O operations still takes place in kernel space, but the scheduling decisions are taken in user space. We have implemented the core of our proposal within the Linux kernel, and the PM2 multithreading environment was ported on top of the corresponding user-level API. Our experiments demonstrate that the implementation of our kernel extensions is very efficient and that the overhead introduced by the user-level interface is very small. Moreover, the observed results show that our approach competes favorably against approaches based on the use of signals or kernel threads.

[1]  Bernard Tourancheau,et al.  The Design for a High-Performance MPI Implementation on the Myrinet Network , 1999, PVM/MPI.

[2]  Bernard Tourancheau,et al.  BIP: A New Protocol Designed for High Performance Networking on Myrinet , 1998, IPPS/SPDP Workshops.

[3]  Gabriel Antoniu,et al.  DSM-PM2: a portable implementation platform for multithreaded DSM consistency protocols , 2001, Proceedings 15th International Parallel and Distributed Processing Symposium. IPDPS 2001.

[4]  Matthew Haines,et al.  On designing lightweight threads for substrate software , 1997 .

[5]  Nathan J. Williams,et al.  Proceedings of the Freenix Track: 2002 Usenix Annual Technical Conference an Implementation of Scheduler Activations on the Netbsd Operating System , 2022 .

[6]  Brian N. Bershad,et al.  Scheduler activations: effective kernel support for the user-level management of parallelism , 1991, TOCS.

[7]  Gabriel Antoniu,et al.  DSM-PM2: A Portable Implementation Platform for Multithreaded DSM Consistency Protocols , 2001, HIPS.

[8]  Jean-François Méhaut,et al.  PM2: Parallel Multithreaded Machine. A Computing Environment for Distributed Architectures , 1995, PARCO.

[9]  Guillaume Mercier,et al.  Madeleine II: a portable and efficient communication library for high-performance cluster computing , 2000, Proceedings IEEE International Conference on Cluster Computing. CLUSTER 2000.

[10]  Ian T. Foster,et al.  The Nexus Approach to Integrating Multithreading and Communication , 1996, J. Parallel Distributed Comput..

[11]  Luc Bougé,et al.  Improving Reactivity to I/O Events in Multithreaded Environments Using a Uniform, Scheduler-Centric API , 2002, Euro-Par.