How Wine is not an emulator?

Well, how emulators and virtual machines simulate internal Windows logic on host non-Windows systems? Isn't that by translating Windows system calls into the host's own respective calls?

No, or at least not in the sense that WINE does -- by literally translating system calls one to one in user space. An emulator does this abstractly via a more circuitous route; it does not translate system calls directly.

A true emulator creates a virtual machine (e.g. x86-64), not a virtual operating system. You can then in theory run any operating system targeting that style of machine. Commonly an "emulator" includes the operating system, but that's not really what it is emulating; the OS it includes is the same as one that would run on a real machine.

Emulators are sometimes used to simulate hardware different from the host machine, but also hardware that is exactly the same for the purpose of running one OS inside another.

WINE is different from this in that it is not actually windows. You could run an x86-64 emulator with a real copy of windows inside it, but that is not what WINE is. Their claim that it is actually more efficient than an emulator makes sense -- the overhead for just translating system calls is probably lower than that of running a VM. The disadvantage is that WINE can only be windows; you cannot use it with some other OS as you could a normal VM.


Consider Java Virtual Machines. No JVM emulates any other, they're all implementations of a specification. Wine isn't emulating the win32 api, it's an implementation of it. Specs and reality not necessarily matching, both Microsoft's implementation and Wine's implementation have workarounds to make buggy code work, and it's not necessarily obvious which implementation is a better target for any given project.


Wine is a shim which intercepts windows API calls and converts them in the fly to the corresponding Linux API call(s). A emulator or virtual machine instead emulates a physical machine. Obviously a shim is more efficient, but may not be completely capable of mimicking the desired functionality.

Tags:

Wine

Emulation