Basic part of any event driven, non-blocking program is event loop. Many mechanisms are provided by operating systems to implement this IO pattern. Some of them are common and some of them are OS-specific.

Let's review the event loop of lighttpd.