Binary code compatibility
|This article needs additional citations for verification. (November 2013)|
Binary code compatibility (binary compatible or object code compatible) is a property of computers (or operating systems) that means they can run the same binary code intended to be run on another computer. This differs from source code compatibility, where recompilation is necessary if the instruction set architectures of the two computers are not compatible.
Usually, compatibility is expressed in terms like backward-compatible, which means that the newer computer has every feature the old one did, plus additional functionality that is not supported on the old machine and thus executable programs will run unchanged (that is without recompilation). That means that the operating system (OS) and hardware in general (to the extent that it is used) has to be the same, or that the OS is application binary interface (ABI) compatible, which makes it a "binary compatible operating system". The hardware doesn't have to be the same if it is compatible at the hardware level or if the differences are hidden by an API (by the OS). If not a general porting of the software can be used to make non-binary-compatible programs work.
Binary-compatibility is a major benefit when developing computer programs that are to be run on multiple operating systems. Several Unix-based operating systems, such as FreeBSD or NetBSD, offer binary compatibility with more popular operating systems, such as Linux-derived ones, since most binary executables are not commonly distributed for such operating systems.
Most operating systems provide binary compatibility, in each version of the operating system, for most binaries built to run on earlier versions of the operating system. For example, most binaries that are compiled for Windows 2000 can also be run on Windows XP and later versions of Windows.
Binary compatible operating systems
Binary compatible operating systems are operating systems who aim to implement binary compatibility with another operating system, or another variant of the same brand. This means that they are ABI-compatible (for application binary interface). As the job of an operating system is to run actual programs, the instruction set architectures running the operating systems have to be the same, compatible or else an CPU emulator or a faster dynamic translation mechanism is sometimes provided that makes them more-or-less compatible.
For example, the Linux kernel is not compatible with Windows. This does not mean that Linux can't be binary compatible with Windows applications. Additional software, Wine, is available that does that to some degree. The ReactOS operating system development effort, seeks to create an open source, free software operating system that is binary compatible with Microsoft's Windows NT family of operating systems using Wine for application compatibility and reimplementing the Windows kernel for additional compatibility such as for drivers whereas Linux would use Linux drivers not Windows drivers. FreeBSD and other members of the BSD family have binary compatibility with the Linux kernel in usermode by translating Linux system calls into BSD ones. This enables the application and libraries code that run on Linux-based operating systems to be run on BSD as well.
Note that a binary compatible operating system is different from running another full OS under virtualization or emulation, to enable software for that other operating system to run, when the host OS isn't compatible. Sometimes however virtualiztion is provided with the host OS (or such software can be obtained), which effectively makes the host operating system compatible with programs. For example Windows XP Mode for Windows 7, which allows users to run a 64-bit version of Windows 7 and have very old software still work in a 32-bit virtual machine running Windows XP, and VMware Workstation/VMware Fusion, Parallels Workstation, and Windows Virtual PC, which allow other operating systems to be run on Windows, Linux, and OS X.
For another example, Mac OS X on the PowerPC had the ability to run Mac OS 9 and earlier application software through Classic—but this did not make OS X a binary compatible operating system with Mac OS 9. Instead, the Classic environment was actually running Mac OS 9.1 in a virtual machine, running as a normal process inside of the OS X operating system.
- Backward compatibility
- Application binary interface (ABI)
- Computer compatibility
- Bug compatibility
- Video game remake
- "Mac OS X System Architecture". 2002. Archived from the original on August 2, 2002.
- Singh, Amit (Jun 29, 2006). Mac OS X Internals: A Systems Approach. Addison-Wesley. Section 2.11.8: Classic. ISBN 0-321-27854-2. "Classic Startup is a Mach-O application that runs Mac OS 9 within its address space. It provides a hardware abstraction layer between Mac OS 9 and Mac OS X by virtualizing traps, system calls, and interrupts. It runs in a protected memory environment, with multiple Mac OS 9 processes within it layered on top of a single Mac OS X BSD process."
- KDE Techbase Policies - Good compendium of C++ development rules of thumb (with some examples) for not breaking binary compatibility between releases of a library.