# Linux® emulation in FreeBSD

### Roman Divacky

`<rdivacky@FreeBSD.org>`

Legal Notice

This masters thesis deals with updating the Linux® emulation layer (the so called Linuxulator). The task was to update the layer to match the functionality of Linux 2.6. As a reference implementation, the Linux 2.6.16 kernel was chosen. The concept is loosely based on the NetBSD implementation. Most of the work was done in the summer of 2006 as a part of the Google Summer of Code students program. The focus was on bringing the NPTL (new POSIX® thread library) support into the emulation layer, including TLS (thread local storage), futexes (fast user space mutexes), PID mangling, and some other minor things. Many small problems were identified and fixed in the process. My work was integrated into the main FreeBSD source repository and will be shipped in the upcoming 7.0R release. We, the emulation development team, are working on making the Linux 2.6 emulation the default emulation layer in FreeBSD.

[ Split HTML / Single HTML ]

# 1 Introduction

In the last few years the open source UNIX® based operating systems started to be widely deployed on server and client machines. Among these operating systems I would like to point out two: FreeBSD, for its BSD heritage, time proven code base and many interesting features and Linux for its wide user base, enthusiastic open developer community and support from large companies. FreeBSD tends to be used on server class machines serving heavy duty networking tasks with less usage on desktop class machines for ordinary users. While Linux has the same usage on servers, but it is used much more by home based users. This leads to a situation where there are many binary only programs available for Linux that lack support for FreeBSD.

Naturally, a need for the ability to run Linux binaries on a FreeBSD system arises and this is what this thesis deals with: the emulation of the Linux kernel in the FreeBSD operating system.

During the Summer of 2006 Google Inc. sponsored a project which focused on extending the Linux emulation layer (the so called Linuxulator) in FreeBSD to include Linux 2.6 facilities. This thesis is written as a part of this project.

|  | Next
|  | A look inside...