Extending futex for kernel to user notification

Threads in reactive applications need to service a multitude of events from different sources such as device drivers, communication channels or cooperating threads. While notification about these events can conceptually be understood as a form of "synchronization", most operating systems (including Linux) do not provide a unified abstraction. This paper proposes to separate event delivery and notification, and to provide unified event notification through general-purpose synchronization objects. It demonstrates how this unified mechanism can be implemented in Linux as an extension of the futex mechanism to allow notification from kernel-space. Required modifications are discussed and their impact is assessed. The new event notification mechanism allows to move many thread activation policy decisions into user-space, with benefits for multi-threaded reactive applications: This is demonstrated in a modification of the leader/followers pattern with considerable performance benefits.

[1]  Douglas C. Schmidt,et al.  Evaluating and Optimizing Thread Pool Strategies for Real-Time CORBA , 2001, OM '01.

[2]  Chuck Lever,et al.  Malloc() Performance in a Multithreaded Linux Environment , 2000, USENIX Annual Technical Conference, FREENIX Track.

[3]  Douglas C. Schmidt,et al.  Pattern-Oriented Software Architecture, Patterns for Concurrent and Networked Objects , 2013 .

[4]  Maurice Herlihy,et al.  A methodology for implementing highly concurrent data structures , 1990, PPOPP '90.

[5]  Beng-Hong Lim,et al.  Reactive synchronization algorithms for multiprocessors , 1994, ASPLOS VI.

[6]  C. Ieee IEEE Standard for Information Technology - Portable Operating System Interface (POSIX): System Application Program Interface (API), Amendment 1: Realtime Extension (C Language), IEEE Std 1003.1b-1993 , 1994 .

[7]  Jonathan Lemon Kqueue - A Generic and Scalable Event Notification Facility , 2001, USENIX Annual Technical Conference, FREENIX Track.

[8]  T. J. Watson,et al.  Fuss , Futexes and Furwocks : Fast Userlevel Locking in Linux Hubertus Franke IBM , 2005 .

[9]  Chuck Lever,et al.  Scalable Network I/O in Linux , 2000, USENIX Annual Technical Conference, FREENIX Track.

[10]  Khaled Salah,et al.  Performance analysis and comparison of interrupt-handling schemes in gigabit networks , 2007, Comput. Commun..

[11]  Ieee Standards Board System application program interface (API) (C language) , 1990 .

[12]  Peter Druschel,et al.  A Scalable and Explicit Event Delivery Mechanism for UNIX , 1999, USENIX Annual Technical Conference, General Track.