Check out the new USENIX Web site. nextupprevious
Next:Vnode Interface Support Up:Kernel Support for DAFS Previous:Kernel Support for DAFS


Event-Driven Design Support

An area of considerable interest in recent years [2,18,19] has been that of event-driven application design. Event-driven servers avoid much of the overhead associated with multithreaded designs but require truly asynchronous interfaces coupled with efficient event notification and delivery mechanisms integrating all types of events. The DAFS server requires such support in the kernel.

FreeBSD presently lacks an internal asynchronous interface to the buffer cache although it does provide an asynchronous I/O (AIO) system call API. AIO is an implementation of the POSIX 1003.1B standard and can be found in other systems such as Solaris [16]. It is implemented as a multithreaded interface to the filesystem over regular files, or using asynchronous device I/O over device-special files. The latter mechanism is more efficient as it avoids overhead associated with multithreading but can only be used for applications using raw device access, such as relational databases.

To integrate disk events with memory-to-memory NIC event handling, a generalization of the network-specific completion group abstraction is needed. Events from network and disk sources can be uniformly handled using kqueue [13], a recently introduced FreeBSD kernel abstraction for scalable event handling. Kqueue can be used to aggregate event sources such as a) completed network I/O, b) completed disk I/O, and c) process synchronization signals. A kqueue structure can handle all event types a DAFS server is interested in. Posting asynchronous operations requires registering kevents with the kqueue. Network and disk event handlers notify the server kqueue using appropriate event filters (i.e. EVFILT_KAIO for disk, and EVFILT_RDMA for network events). Notification can either be via polling (using kqueue_scan()) or, with a minor addition to the kqueue implementation, via a direct or delayed kernel upcall to a handler routine.


nextupprevious
Next:Vnode Interface Support Up:Kernel Support for DAFS Previous:Kernel Support for DAFS
Kostas Magoutis 2001-12-03