Compatibility layer

Source: Wikipedia, the free encyclopedia.

In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With some libraries for the foreign system, this will often be sufficient to run foreign binaries on the host system. A hardware compatibility layer consists of tools that allow hardware emulation.

Software

Examples include:

  • Wine, which runs some Microsoft Windows binaries on Unix-like systems using a program loader and the Windows API implemented in DLLs
  • Windows's application compatibility layers to attempt to run poorly written applications or those written for earlier versions of the platform.[1]
  • Mac OS X
    and Unix-like systems with native look and feel.
  • KernelEX, which runs some Windows 2000/XP programs on Windows 98/Me.
  • Executor, which runs 68k-based "classic" Mac OS programs in Windows, Mac OS X and Linux.
  • Anbox, an Android compatibility layer for Linux.

Compatibility layer in kernel:

  • FreeBSD's Linux compatibility layer, which enables binaries built specifically for Linux to run on FreeBSD[18] the same way as the native FreeBSD API layer.[19] FreeBSD also has some Unix-like system emulations, including NDIS, NetBSD, PECoff, SVR4, and different CPU versions of FreeBSD.[20]
  • NetBSD has several Unix-like system emulations.[21]
  • Columbia Cycada, an unreleased compatibility layer which runs Apple iOS applications on Android
    systems
  • Windows Subsystem for Linux provides a Linux-compatible kernel interface developed by Microsoft.[22]
  • The PEACE Project (aka COMPAT_PECOFF) has Win32 compatible layer for NetBSD. The project is now inactive.
  • On RSTS/E for the PDP-11 series of minicomputers, programs written to run on the RT-11 operating system could run (without recompiling) on RSTS through the RT-11 Run-Time System having its EMT flag set, meaning that an RT-11 EMT instruction that matches a RSTS EMT is diverted to the RT-11 Run-Time System which translates them to the equivalent RSTS EMT. Programs written to take advantage of RSTS directly (or calls to RSTS within the Run-Time system itself) signal this by having a second EMT instruction (usually EMT 255) immediately before the actual RSTS EMT code.

A compatibility layer avoids both the complexity and the speed penalty of full hardware emulation. Some programs may even run faster than the original, e.g. some Linux applications running on FreeBSD's Linux compatibility layer may perform better than the same applications on Red Hat Linux. Benchmarks are occasionally run on Wine to compare it to Windows NT-based operating systems.[23]

Even on similar systems, the details of implementing a compatibility layer can be quite intricate and troublesome; a good example is the IRIX binary compatibility layer in the MIPS architecture version of NetBSD.[24]

A compatibility layer requires the host system's CPU to be (upwardly) compatible to that of the foreign system. For example, a Microsoft Windows compatibility layer is not possible on PowerPC hardware because Windows requires an x86 CPU. In this case full emulation is needed.

Hardware

Hardware compatibility layers involve

computer buses
that are otherwise incompatible with the machine.

See also

References

  1. ^ Charlie Russel, Microsoft MVP for Windows Server and Tablet PC (2002-02-18). "Application Compatibility in Windows XP".
  2. ^ "Cygwin". www.cygwin.com. Retrieved 2019-11-23.
  3. ^ "Project: 2ine | Patreon".
  4. ^ "Tizen OS will run Android apps -- with a little help from third-party software (Video)".
  5. ^ "OpenMobile ACL for webOS resurrected on Kickstarter, hopes to bring Android apps to HP Touchpad".
  6. ^ "OpenMobile demos ACL for MeeGo, promises 100 percent compatibility with Android apps (Video)".
  7. ^ "Myriad 'Alien Dalvik' runs Android apps on any phone... Starting with MeeGo (Video)".
  8. ^ "Myriad Alien Dalvik hands-on (Video)".
  9. ^ "Running Android Apps on the iPad with Myriad's Alien Dalvik". YouTube.
  10. ^ "Hands-on with Myriad's Alien Dalvik 2.0 on an iPad (Video)".
  11. ^ "Android apps to run on iPad with Alien Dalvik 2.0".
  12. ^ "TouchHLE: High-level emulator for iPhone OS apps". GitHub.
  13. ^ "High-level iOS emulator touchHLE runs on Windows and Mac, aims to preserve old iOS gaming apps".
  14. ^ "Developer ports iOS emulator to Android, but you shouldn't get excited about it". 24 April 2023.
  15. .
  16. ^ "Aah". GitHub.
  17. ^ "BRS-EMU: BrightScript Emulator". GitHub.
  18. ^ "Linux emulation in FreeBSD".
  19. ^ "Emulation". freebsd.org. Retrieved 2014-03-16.
  20. ^ "A look inside..." freebsd.org. Retrieved 2014-03-16.
  21. ^ "NetBSD Binary Emulation". netbsd.org. Retrieved 2014-03-16.
  22. ^ "Comparing WSL 1 and WSL 2". 20 March 2023.
  23. ^ BenchMark-0.9.5 Archived 2010-12-09 at the Wayback Machine - The Official Wine Wiki
  24. ^ Emmanuel Dreyfus (August 8, 2002). "IRIX Binary Compatibility, Part 1". onlamp.com. Archived from the original on 2017-10-21. Retrieved 2014-03-16.

External links