1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

FreeBSD: A Faster Platform For Linux Gaming Than Linux?

Michael Larabel

Published on 7 September 2011
Written by Michael Larabel
Page 1 of 6 - 102 Comments

FreeBSD provides a Linux binary compatibility layer that allows 32-bit Linux binaries to be natively executed on this BSD operating system. Linux binary compatibility on FreeBSD allows Linux-only applications to be executed in a near seamless manner on this alternative platform, even for games. New tests have revealed that the modern FreeBSD operating system (via PC-BSD 8.2) can actually outperform Linux when it comes to running OpenGL Linux game binaries.

This Linux binary compatibility support for FreeBSD is commonly referred to as "Linux emulation", but it is not emulating Linux in a traditional sense nor is it acting like Wine in user-space. This is a Linux ABI implementation for the FreeBSD kernel.

The FreeBSD Handbook covers Linux binary compatibility with how to enable the support under FreeBSD. Enabling the support requires loading a Linux KDO (kernel module) and altering the /etc/rc.conf. Linux run-time libraries also need to be installed, which can easily be done by using FreeBSD ports.

For this Phoronix benchmarking, PC-BSD 8.2 was used since its focus is on providing a pleasant FreeBSD desktop experience, complete with the KDE4 desktop environment by default. PC-BSD ships with Linux binary compatibility support enabled by default and a number of the Linux run-time libraries. During this testing only a few extra Linux run-time libraries had to be installed from FreeBSD ports like libvorbis, libasound, and SDL.

This support is available to users of FreeBSD on i386 and AMD64, but currently in mainline FreeBSD, it is limited to only supporting 32-bit Linux binaries. There has been experimental work on Linux x86_64 binary support, but nothing has yet been merged in stable form. Right now in FreeBSD 8.2 ports is an implementation based on the Linux 2.6 kernel and the user-space libraries are from Fedora 10.

There is this advanced page of the FreeBSD handbook covering the Linux emulation at a more in-depth level. The key section:

"When a system call is called by the Linux binary, the trap code dereferences the system call function pointer off the proc structure, and gets the Linux, not the FreeBSD, system call entry points.

In addition, the Linux mode dynamically reroots lookups; this is, in effect, what the union option to file system mounts (not the unionfs file system type!) does. First, an attempt is made to lookup the file in the /compat/linux/original-path directory, then only if that fails, the lookup is done in the /original-path directory. This makes sure that binaries that require other binaries can run (e.g., the Linux toolchain can all run under Linux ABI support). It also means that the Linux binaries can load and execute FreeBSD binaries, if there are no corresponding Linux binaries present, and that you could place a uname(1) command in the /compat/linux directory tree to ensure that the Linux binaries could not tell they were not running on Linux.

In effect, there is a Linux kernel in the FreeBSD kernel; the various underlying functions that implement all of the services provided by the kernel are identical to both the FreeBSD system call table entries, and the Linux system call table entries: file system operations, virtual memory operations, signal delivery, System V IPC, etc... The only difference is that FreeBSD binaries get the FreeBSD glue functions, and Linux binaries get the Linux glue functions (most older OS's only had their own glue functions: addresses of functions in a static global sysent[] structure array, instead of addresses of functions dereferenced off a dynamically initialized pointer in the proc structure of the process making the call)."

<< Previous Page
1
Latest Linux Hardware Reviews
  1. A Walkthrough Of The New 32 System Open-Source Linux Benchmarking Test Farm
  2. Habey MITX-6771: Mini-ITX Board With Quad-Core J1900 Bay Trail
  3. OCZ Vector 150 SSD On Linux
  4. Noctua i4 CPU Cooler: Great For Cooling High-End LGA-2011v3 CPUs
Latest Linux Articles
  1. AMD Kaveri: Open-Source Radeon Gallium3D vs. Catalyst 14.12 Omega Driver
  2. 12-Way AMD Catalyst 14.12 vs. NVIDIA 346 Series Linux GPU Comparison
  3. AMD Catalyst 14.12 Omega Driver Brings Mixed Results For Linux Users
  4. 6-Way Winter 2014 Linux Distribution Comparison
Latest Linux News
  1. PostgreSQL 9.4 Brings JSONB & Many Other New Features
  2. That Nasty Linux Kernel Lockup Bug Is Still Unresolved
  3. KDE's Krita Loses Its Main Backer
  4. Inline Data Support Comes To CephFS With Linux 3.19
  5. VC4 Gallium3D Adds DMA-BUF Support, Yields Working DRI3
  6. GNOME Builder Is Still Building Up To A New IDE For Developers
  7. Raspberry Pi's Gallium3D Driver Could Now Run Significantly Faster
  8. CMake 3.1 Brings Windows Additions, Target Compile Feature
  9. KDE Applications 14.12 Released
  10. Fedora 21 Released For POWER & AArch64 Hardware
Latest Forum Discussions
  1. Bench specific mount point
  2. XLennart: A Game For Systemd Haters With Nothing Better To Do
  3. Tool for measuring FPS in games
  4. Need some hand holding with upgrading xserver
  5. Ubuntu Developers Still Thinking What To Do About Adobe Flash Support
  6. Microsoft buying Mojang
  7. Updated and Optimized Ubuntu Free Graphics Drivers
  8. Premium subscription "login" times out much faster than forum