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. CompuLab Intense-PC2: An Excellent, Fanless, Mini PC Powered By Intel's i7 Haswell
  2. From The Atom 330 To Haswell ULT: Intel Linux Performance Benchmarks
  3. AMD Radeon R9 285 Tonga Performance On Linux
  4. Apotop Wi-Copy
Latest Linux Articles
  1. AMD Moves Forward With Unified Linux Driver Strategy, New Kernel Driver
  2. MSI: Update Your BIOS From The Linux Desktop
  3. NVIDIA vs. AMD 2D Linux Drivers: Catalyst Is Getting Quite Good At 2D
  4. 15-Way GPU Comparison With Mesa 10.3 + Linux 3.17
Latest Linux News
  1. GParted 0.20 Improves Btrfs Support
  2. EXT4 In Linux 3.18 Has Clean-ups, Bug Fixes
  3. Emacs 24.4 Has Built-In Web Browser, Improved Multi-Monitor Support
  4. NVIDIA's NVPTX Support For GCC Is Close To Being Merged
  5. KDE's KWin On Wayland Begins Using Libinput
  6. Khronos Releases OpenVX 1.0 Specification
  7. Linux Kernel Working Towards GNU11/C11 Compatibility
  8. Ubuntu 15.04 Is Codenamed After A Monkey: Vivid Vervet
  9. Following GCC, Clang Looks To Default To C11
  10. Users/Developers Threatening Fork Of Debian GNU/Linux
Latest Forum Discussions
  1. Users/Developers Threatening Fork Of Debian GNU/Linux
  2. HOPE: The Ease Of Python With The Speed Of C++
  3. Bye bye BSD, Hello Linux: A Sys Admin's Story
  4. NVIDIA Presents Its Driver Plans To Support Mir/Wayland & KMS On Linux
  5. AMD Is Restructuring Again, Losing 7% Of Employees
  6. Open-Source AMD Fusion E-350 Support Takes A Dive
  7. Upgrade to Kaveri, very slow VDPAU performance
  8. ChromeOS Drops Support For EXT2/EXT3/EXT4 File-Systems