Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Kqueue is a
scalable event notification interface that first appeared in FreeBSD
4.1. Kqueue enables the user to receive alerts regarding events on
specified targets very quickly. NetBSD, OpenBSD and Darwin also include
Kqueue ports. Kqueue provides efficient input and output event pipelines
between the kernel and userland. Thus, it is possible to modify event
filters as well as receive pending events while using only a single
system call to kevent(2) per main event loop iteration. This contrasts
with older traditional polling system calls such as poll(2) and
select(2) which are less efficient, especially when polling for events
on a large number of file descriptors.