Thursday, February 4, 2010

The most modular ever

This Tuesday I attended Lukas Mejdrech's defense of his master thesis Networking and TCP/IP stack for HelenOS system. Lukas literally did an excellent job presenting his work, which was credited accordingly by the committee.

One benefit of Lukas's thesis is that the same networking code can be built using either monolithic architecture or modular architecture. The former refers to a setup with one userspace server task handling the network interface and the network interface access protocol, and another userspace server task for handling ARP, IP, ICMP, UDP and TCP. The latter modular model has a separate server task for each network stack layer. While the monolithic design performs about twice as good, the modular has the potential to be more robust in case of programming errors. Lukas did some research and investigated the other common microkernel-based operating systems out there and found that all have a monolithic networking stack (e.g. MINIX 3 and its INET server). We are yet to merge the networking branch into our mainline and the TCP module still needs a little bit of coding, but with this in mind, HelenOS can be thought of as the most modular multiserver operating system on the planet and also the first to achieve the goal of coming with a fully modular unprivileged networking stack.