Library Operating System for Linux - a quick introduction.
Post by: hatt
Like any other library OS, ex: IBM’s AS/400 Linux is coming up with there own Library OS called LibOS.
LibOS - What is it ?
The library exposes an entry point as API, which is lib_init(), in
order to connect userspace applications to the (userspace-version)
kernel network stack. The clock source, virtual struct net_device, and
scheduler are provided by caller while kernel resource like system
calls is provided by callee.
Once the LibOS is initialized via the API, userspace applications with
POSIX socket can use the system calls defined in LibOS by replacing
from the original socket-related symbols to the LibOS-specific
one. Then application can benefit the network stack of LibOS without
involving the host network stack.
Currently, there are two users of LibOS: Network Stack in Userspace
(NUSE) and ns-3 network simulatior with Direct Code Execution
(DCE). These codes are managed at an external repository(*1).
== How to use it ? ==
to build the library,
% make {defconfig,menuconfig} ARCH=lib
then, build it.
% make library ARCH=lib
You will see liblinux-$(KERNELVERSION).so in the top directory.
== More information ==
The crucial difference between UML (user-mode linux) and this approach
is that we allow multiple network stack instances to co-exist within a
single process with dlmopen(3) like linking for easy debugging.
These patches are also available on this branch:
git://github.com/libos-nuse/net-next-nuse.git for-asm-upstream
For further information, here is a slideset presented at the last
netdev0.1 conference.
http://www.slideshare.net/hajimetazaki/library-operating-...
I would appreciate any kind of your feedback regarding to upstream
this feature.
*1 https://github.com/libos-nuse/linux-libos-tools
Our objective is to build the kernel network stack as a shared library
that can be linked to by userspace programs to provide network stack
personalization and testing facilities, and allow researchers to more
easily simulate complex network topologies of linux routers/hosts.
Although the architecture itself can virtualize various things, the
current design only focuses on the network stack. You can benefit
network stack feature such as TCP, UDP, SCTP, DCCP (IPv4 and IPv6),
Mobie IPv6, Multipath TCP (IPv4/IPv6, out-of-tree at the present
moment), and netlink with various userspace applications (quagga,
iproute2, iperf, wget, and thttpd).
-Hajime Tazaki