Rosetta (Apple)

from Wikipedia, the free encyclopedia

Rosetta is a framework from Apple for transparent emulation of programs for another, previously unused by Apple in the computers of Mac-series processor architecture. Programs can therefore still be executed on Macs with processors of a different architecture under macOS . Rosetta was part of the Mac OS X operating system between 2006 and 2011 and made it possible to run programs compiled for PowerPC processors unchanged on x86 processors . With Rosetta 2 , Macs with ARM architecture announced in 2020 will be able to run programs for Intel x86 processors under macOS.

The name is based on the Rosetta stone , which contributed significantly to the deciphering of the hieroglyphics .

history

The macOS operating system from Apple goes back to OPENSTEP (originally NeXTStep). It is essentially portable and ran on a variety of different architectures. After the operating system was bought by Apple at the end of 1996, it only ran on Apple's own computers and thus on the architecture of the Macintosh computers - in 1997 this was the PowerPC architecture to which it was ported and optimized. The core of the operating system was summarized as Darwin and the source code made available under an open license, which is why there was an x86 version of Darwin early on.

When Apple finally made the decision to switch to the Intel x86 architecture in 2005 due to the inadequate performance of the PowerPC processors G4 from Motorola and G5 from IBM, the operating system was already running as an x86 version. An operating system based on Darwin and macOS, iOS , has been running on the ARM architecture introduced with the iPhone since 2007 . The processors were initially developed together with Samsung, since the Apple A8 from 2014, the processors have been pure Apple products. In 2020 Apple announced the move from Intel processors to in-house ARM SoCs for the Mac as well, a move that had been rumored for years before. The ARM SoCs have been on par with the Intel processors in performance and energy consumption since the A12Z built into the 4th generation iPad Pro from 2020 . It was therefore not a great deal of effort for Apple to port macOS to the ARM architecture, on which a variant with iOS has already been in service for over a decade.

In both cases, Rosetta is a transparent emulation integrated into the operating system in order to be able to continue to execute applications for the respective previous architecture. The programs run slower in their execution speed, but can still be used in their unchanged form, although full compatibility cannot be guaranteed for every application. The emulator is only part of the strategy for the transition to a different processor architecture, since developers of applications for the Mac are encouraged to offer universal binaries that contain native binary code for both architectures. The concept of Universal Binaries stems from the NeXTStep legacy, where theoretically code for all possible architectures can be contained in a single executable program.

Rosetta: PowerPC on Intel-x86

Rosetta
Basic data

developer Apple Inc. licensed from Transitive
operating system Mac OS X
↳ 10.4.4-10.4.11 / Intel
↳ 10.5-10.5.8 / Intel
↳ 10.6-10.6.8 (Intel)
category PowerPC binary translation
License proprietary
no longer available (archived: apple.com/us/rosetta )

backgrounds

In 2005 Apple announced that it would switch from the PowerPC processors , which had been in use since 1994 and developed jointly with IBM and Motorola , to x86 processors from Intel. In addition to the completely different instruction set architecture, there is another essential difference between the processor types in the processing of the byte order (the PowerPC is big-endian, Intel's x86 processors are little-endian).

So that software developed up to now could also be used on the new Intel Macs, Apple licensed software from Transitive Technologies , which had already offered a number of conversion programs for different processors , and marketed its own implementation of the emulation software called QuickTransit under the name Rosetta . Transitive was acquired by IBM in 2008 and the cross-platform virtualization technology was merged into PowerVM.

At the same time, Apple continued to develop its own developer tools and made it possible to develop universal binaries , in which the executable code for several processor architectures is packaged in a single program file.

While the operating systems Mac OS X Tiger (10.4) and Leopard (10.5) support both PowerPC and Intel Macs, macOS from version Snow Leopard (10.6) is only available for Intel Macs. Since the release of Mac OS X Lion (10.7) in July 2011, Rosetta is no longer part of the operating system; Software developed for PowerPC processors can therefore no longer run on current Macs. Universal binaries can, however, generally also be executed on later versions of macOS, as they contain not only the PowerPC binary code but also those for x86 processors. However, many applications of this time are 32-bit programs, so most universal binaries with 32-bit PowerPC / Intel code can no longer be executed under macOS Catalina , which only supports 64-bit. But even up to macOS Mojave , which still supports 32-bit programs, due to profound changes to the operating system, old applications (including universal binaries) cannot always run, for example Microsoft Office 2008 . In some cases, however, there are newer versions and ports to 64-bit.

Working method

Rosetta is a so-called dynamic binary translator , so it runs in the same process as the program to be executed and only translates individual code blocks when they are called by the program. Parts of the program that are not executed (for example because the user does not use a function of the program) are not translated either.

During the translation, the called PowerPC code block is first translated into a processor-independent intermediate format, from which code optimized for the target architecture is then generated. This native code is then executed on the hardware. Comparable software can sometimes do without the use of an intermediate format, which was probably introduced by Transitive because its software supported several source and target architectures.

In contrast to an emulation in which individual instructions are translated, the block-by-block translation of successive instructions enables a semantic understanding of the code block to be translated and thus an optimization of the native program code generated from the intermediate format. Apple therefore emphasized that there is no emulation.

restrictions

Rosetta understands program code written for a PowerPC G3 and PowerPC G4 and can translate the entire AltiVec instruction set. Software that requires a G5 , on the other hand, cannot be executed, but this only affects very few programs. In addition, Rosetta refuses all hardware-related functions; Kernel modules or drivers for scanners, keyboards and audio devices, for example, cannot be translated with it.

Rosetta 2: Intel x64 on ARM64

Rosetta 2
Basic data

developer Apple Inc.
operating system macOS
↳ 11.0 (ARM64)
category x86 -64 binary translation
License proprietary
announcement

backgrounds

Rosetta 2 is part of macOS Big Sur to help with Apple's transition from Intel processors to ARM (Apple Silicon) processors. In addition to real-time translation, as with Rosetta, Rosetta 2 supports the translation of the program during installation.

restrictions

At WWDC 2020 Apple showed virtualization with Parallels, but ARM Linux was running. There will be no x86 virtualization via Rosetta 2, but a manufacturer of virtualization solutions, Parallels , has already announced a product for ARM Macs.

Web links

Individual evidence

  1. Adopting Universal Binaries on Mac OS X. (No longer available online.) In: Apple Developer Connection . Apple, Inc., January 31, 2006, archived from the original on October 17, 2006 .;
  2. a b Lucas Graves: Can Apple Make The Switch? Interview with Transitive CEO Bob Wiederhold. In: Wired Magazine . No. 8 , 2005 ( wired.com [accessed July 24, 2011]).
  3. Andreas Beier: IBM buys the virtualization specialist Transitive. In: Heise online . November 19, 2008 . Retrieved July 10, 2020.
  4. Universal Binary Programming Guidelines. (PDF) Apple, archived from the original on August 15, 2006 ; Retrieved June 8, 2005 . The excerpts used are reproduced on: daringfireball.net
  5. ^ John Stokes: Thinking about Apple's Rosetta in light of Transmeta. arstechnica.com, August 2005, accessed July 24, 2011 .
  6. Rosetta. In: Apple.de. Archived from the original on December 21, 2010 ; accessed on July 24, 2011 (English).
  7. Tom Warren: Apple is switching Macs to its own processors starting later this year. June 22, 2020, accessed on July 5, 2020 .
  8. Benjamin Mayo: Apple announces Mac architecture transition from Intel to its own ARM chips, offers emulation path. In: 9to5Mac. June 22, 2020, accessed July 5, 2020 (American English).
  9. Monica Chin: Rosetta 2 is Apple's key to making the ARM transition less painful. June 26, 2020, accessed on July 5, 2020 .
  10. Leo Becker: ARM Macs: No Rosetta support for x86 virtualizers and kernel extensions. In: Heise online . June 24, 2020 . Retrieved July 5, 2020.