libports
The library underneath almost every Hurd server, mapping Mach ports to objects and dispatching incoming messages to threads.
A Hurd server receives requests as messages on Mach ports, with every open file or socket backed by a port of its own. libports keeps track of which port belongs to which internal object, groups ports into "buckets" and "classes", and provides a ready-made loop that receives messages and hands them to the stubs generated by MIG — single-threaded, or with a thread pool that grows on demand.
It also handles reference counting: when the last client drops its send right, Mach delivers a "no-senders" notification and the object can be torn down. That is the Hurd's equivalent of closing a file descriptor, only spread across two address spaces and a kernel that has no idea what a file is.