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. The MSI X99S SLI PLUS Is Working & Running Well On Linux
  2. NVIDIA GeForce GTX 980: The Best GPU For Linux Gamers
  3. ROCCAT LUA: A Linux-Friendly Gaming Mouse
  4. Cheetah Mounts: The Affordable Way To Put Your TV On The Wall
Latest Linux Articles
  1. Preview: Radeon Gallium3D Performance For CS:GO On Linux
  2. XWayland Linux Gaming Performance With GNOME Wayland On Fedora 21
  3. EXT4/Btrfs/XFS/F2FS Benchmarks On Linux 3.17
  4. Fedora 21 Alpha First Impressions: It's Great
Latest Linux News
  1. Radeon DRM Gets New Information Ioctl Queries
  2. Mir 0.8 Works On Less ABI Breakage, Touchspots, Responsiveness
  3. CS:GO For Linux Gains Better Stability, Community Server Support
  4. NVIDIA Issues Updated 340.46 Long-Lived Driver Release
  5. KDE Plasma 5.1 Now In Beta
  6. Systemd & Debian Were Most Popular In September
  7. Microsoft Announces... Windows 10 With A Start Menu
  8. Borderlands 2 Launches On Steam For Linux
  9. Debian Jessie Might Get Rid Of The kFreeBSD Port
  10. Fedora Might Try A New Scheduling Strategy For Its Releases
Latest Forum Discussions
  1. Microsoft Announces... Windows 10 With A Start Menu
  2. NVIDIA Alerts Nouveau: They're Starting To Sign/Validate GPU Firmware Images
  3. Updated and Optimized Ubuntu Free Graphics Drivers
  4. Nero CD/DVD Burning Software On Linux Is Dead
  5. New Group Calls For Boycotting Systemd
  6. FSF Issues Statement On Shellshock Bash Vulnerability
  7. X.Org Women Outreach Program Only Turns Up Two Applicants So Far
  8. X.Org Is Looking For Some Female Help