When many people think of operating systems they think of implementations like Microsoft’s Windows 7, or Apple’s Mac OS-X. Few people think of the operating systems that run on the equipment which make networks function. In this article I will discuss various operating systems used on network routing hardware, focussing on large-scale implementations.
Routers are a very important part of any large network, and the internet as a whole. Routers have a very specific job function; to route packets. To successfully accomplish that job, routers often require much less hardware and software than a home computer requires. For instance, routers have little need for graphics capabilities. The hardware and software for a router is chosen so that routing happens as effectively and efficiently as possible; having an operating system like Windows 7 running on a router, while it could be done, would be a waste of capability and would very likely take resources away from the router’s core function of routing packets.
In order to maximize performance routers often have specialized software which have limited capability but are very specialized to take advantage of the hardware and to perform the functions required of a router. The specialized software starts with the operating system. There are many routers, many with unique operating systems. Here are some common ones.
CISCO routers come with the CISCO IOS (Internetwork Operating System) operating system (OS). Most versions of this OS use a monolithic kernel. This means that all functions required for the OS to run operate inside the kernel space which provides system calls to handle process management, concurrency, and memory management. For a diagram of a monolithic kernel architecture see Figure 2 below. While this is a much simpler (conceptually) method and one that can more easily be tailored to high performance applications, this is not conducive to high availability; if one process is corrupted running on a monolithic kernel it can often cause the whole OS to crash. For more information on high availability see my previously published article on that topic. Over the last few years CISCO has been working to change some of their IOS offerings to take advantage of a micro-kernel, which by definition is not monolithic. CISCO products which ship with these micro-kernel versions of IOS are geared towards the high availability market. CISCO uses a third party micro-kernel called QNX. Micro-kernels, like QNX, have the advantage that many OS functions operate as running processes and do not share the same memory space as the kernel. Therefore if a running process is corrupted, that process will crash but other processes will not and the kernel will remain running and will (or could be programmed to) restart the process as necessary.
Micro vs Monolithic Architectures
One of the main functionalities that all kernels require is the ability to communicate between processes. In a monolithic kernel these communications are often called signals. Each process will have a signal handler which can accept a signal and perform the appropriate modifications to its process. In a micro-kernel OS architecture, inter-process communications happen on a single virtual messaging bus. In fact, in a micro-kernel the functions handling the file system, device drivers, and memory management are all services which run outside of the kernel and communicate via this virtual messaging bus. This micro kernel architecture allows many services to be swapped in and out on the fly and is the basis for its renowned reliability.
Figure 1: Diagram of a micro-kernel architecture courtesy of www.brokenthorn.com
Of course, micro-kernels are not perfect. It is quite difficult for micro-kernels to operate at high speeds, whereas monolithic kernels have an easier time with speed. Also, micro-kernels can have a larger memory foot print. This is counter-intuitive because micro-kernels are by themselves much smaller (hence the term micro). They can however grow larger if additional modules are added so that the micro-kernel plus the modules perform the same functions as a monolithic kernel. This is because of all of the “glue code” required to make it all work. Of course all of these factors for and against each kernel greatly depend on the quality of code of which it is made. For instance the QNX micro-kernel which is licensed to CISCO is widely regarded as being impressively fast. Likewise, FreeBSD is widely regarded as very stable and is based on a monolithic kernel architecture.
Fgure 2: Diagram of a monolithic kernel architecture courtesy of www.brokenthorn.com
Juniper routers come with the JUNOS operating system. JUNOS is based on FreeBSD which uses a monolithic kernel architecture. Some might argue that since JUNOS is based on a monolithic kernel architecture that it would not be as reliable as a micro-kernel architecture based OS like some of the CISCO IOS offerings, this however is not so clear cut. Many people would argue (I am sure Juniper would be among them) that since Juniper focuses their efforts on the development of only one operating system that they can pay more attention to the small details that can have a big impact on factors like reliability. The most important factor which determines the performance of a finished product is not the architecture but the quality of the code; the chosen architecture merely starts the product off on the right foot.
While FreeBSD is open source, Juniper’s JUNOS is not. There does exist however, an open source implementation of BSD specifically optimized for use by routers. This OS is called the BSD router project (BSDRP). The BSDRP OS, while free, is not intended for home use but for small to medium sized businesses, like perhaps a small internet service provider (ISP). The BSDRP is designed to be a one-sized fits all operating system though it is streamlined to optimally perform routing tasks.
Proprietary Operating systems whether they are from CISCO, Juniper, or another company, work best when they have been optimized for the hardware on the router. This is the main advantage that they have over open source software such as the BSDRP and is best suited for high performance and high availability situations such as carrier-grade networks. However, this optimization process depends greatly on the quality of the hardware. This is why many router manufacturers are beginning to move away from off-the-shelf RISC (Reduced Instruction Set Computer) processors towards custom ASIC (Application Specific Integrated Circuit) architectures. For instance, in 2008 CISCO announced their QuantumFlow processor which is a 40-core processor which comes with their Aggregation Services Router (ASR) products.
For more information on multi-core processors and the issues that they bring up see my previously published articles here, here, and here. If you want any further information, check out this article on processor affinity.
In this article I gave you a brief introduction to the world of specialized operating systems in a networking context. If you have any questions or comments do not hesitate to email me and I will do my best to respond promptly.