No, my computer is not a fast PDP-11. Rather, it is a much faster, much more advanced architecture, that's capable of emulating many fast PDP-11s at once.

Ever since virtual memory was invented, operating systems have been about providing a virtual environment for their programs, which generally gives programs the illusion that they have their own memory space, etc. The idea of VM/CMS is that each program gets its own CMS computer.

How is this really different from a hypervisor that's optimized to quickly spin up a unix userspace environment and run a process in it?

Also modern OSes generally have a way to detect different types of binaries and run them through the right binary interpreter, without having to resort to shebang shenanigans and modifying the file. WINE does it with .exe, so why can't/don't other emulators do this? Is it lack of a standard mechanism for setting it up?

It'd be great to just run an unmodified 8080 CP/M program on my terminal from bash just like I can run, say, /usr/bin/git? Maybe I'd need some qemu configuration to tell it where to find libraries, etc., but that's fair.

If wine can do it with .exe files, why can't we do similar with SunOS 3.5 or OS/2 or Minix or C64 binaries, via QEMU or SIMH or VICE or whatever? Sure, you'd have to install an emulator or runtime, but when you do, why not just get binary execution capability?

Is it just that nobody has done this, or it's not possible for some reason, or maybe someone has done it and I just don't know about it?

(Yeah there would be challenges, like being able to tell if a PRG file was for C64 or PET or C128 or VIC-20 or whatever, but it could be configuratble.)

@ben Maybe I misunderstand the problem to be solved, but Linux has binfmt_misc for this purpose: https://docs.kernel.org/admin-guide/binfmt-misc.html
Kernel Support for miscellaneous Binary Formats (binfmt_misc) — The Linux Kernel documentation

@mkl Exactly, I'm wondering why it's mostly used for wine, java, and #! stuff. It'd be super cool if other packages could set it up too.
@ben NixOS relies on it to enable running of foreign-architecture executables through QEMU user space emulation.

For older or more exotic emulation targets I suppose that it might be harder to properly integrate and there are also fewer users that rely on it on a regular basis.

Even a binary intended to run on another unixoid system might contain assumptions about file system structure that no longer hold true on a modern Linux system.

DOS or Windows emulators solve that problem by providing a conventional (target system) file system structure in addition to access to the full VFS.

But I agree that it would be neat to have tighter and more seamless integration in general.