Microsoft planning to enable x86 on ARM64 emulation in Windows 10 by Fall 2017
zdnet.com
zdnet.com
This actually sounds like a very good move by Microsoft. Just issue people a phone and they will do all their work on that. There's really no need for giant workstations anymore, and I think this will be more successful than a Chromebook-type thing.
What you meant to say was: You don't need giant workstations anymore. There are still plenty of people doing demanding work on their computers.
Think about flash storage on phones to be more in class of a fast SD card, not the SATA3 SSD in your laptop.
We either have to focus on making our applications more efficient, as we did 10 or so years ago, or make high performance computers more accessible.
What ends up biting me is the need for a docking station or a laptop form factor thing for use on the go. If display glasses/goggles could ever become usable for long duration it would go a long way towards making a single device usable everywhere.
And then, as you mention, FX!32 for running 32-bit apps (slowly) on NT/Alpha - I had it running on a Multia for a while. Those were some fun tiny machines.
Apple used it (as "Rosetta") to run PPC binaries on x86, but it supported other CPU architectures, both as emulated platform and native targets.
Last time I checked, there wasn't even a working emulator for Alpha. I've been thinking about trying my hand at it, if only I had the time and the resources...
The Alpha was also interesting in that it tried extremely hard to avoid saddling itself or future versions with legacy baggage.
Unlike x86, ARM, MIPS, POWER, PA-RISC, SuperH, etc., Alpha was designed without a legacy support 32-bit addressing mode. Of course, if you link against a malloc implementation that stays below the 4 GB boundary, you can use JVM-like pointer compression. (If you need to support heap objects with pointers to the stack, you'll of course also need your stack allocated below the 4 GB boundary.) A lot of pointer-heavy code, however, can be rewritten to use 32-bit array indexes instead.
They tried to get away without single-byte load or store instructions (many string manipulations don't really act on single bytes), though they were added in a later revision. A friend hired to write compilers for DEC shortly before the Compaq buyout told me that hardware engineers had to show simulated benchmark improvements when arguing for new instructions. They pushed back hard to keep valuable instruction space from becoming a junkyard of legacy instructions.
As mentioned, they made as few memory guarantees as practical and forced applications to use memory fence instructions to make their needs explicit to the processor. This left them more flexibility in implementing later models.
The firmware (PAL Code) was almost a hypervisor/nanokernel, with the OS kernel making calls to the PAL Code. The PAL Code version used for Tru64 UNIX/Linux implemented just two protection rings, while the PAL Code version used with OpenVMS emulated more protection rings. As you remember, as long as access violations trap to the most privileged ring, you can emulate an arbitrary number of rings between the least and most privileged rings.
I think it's perfectly sensible to be weaker than x86. But having to deal with data dependency as you have to do on alpha is just too cumbersome / hard to get right. Acquire/Release (or read/write/full) memory barriers are quite easy to understand, but data dependency barriers are damned finnicky, and missing ones are really hard to debug.
I'm more than a bit doubtful that the cost of a halfway sane (even if weak) coherency model is a relevant blocker in upping the scale of both CPUs core counts and applications. At the moment the biggest issue seems to be the ability of developers to write scalable software, and to come up with patterns that make write writing scalable software more realistic.
I suspect there's room for selectively reducing the coherency effects of individual instructions in some memory models - e.g. x86 atomic instructions that don't essentially imply a full memory barrier (disregarding uncached access and such) would be great. Selectively lowering the coherency makes it possible to do so in the hottest codepaths.
The binary file format on Windows is called PE (portable executable). I wonder if this might possibly be a fat binary format.
"WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows".
"WINdows Emulator" -> WINE
I've seen both interpretations be used.
In this case, "minimal hypervisor and address space translation layer" (more or less - I've no idea exactly what it does) is somewhat harder to remember.
I think they were going for "simplest/shortest word that gets the point across" since that document is likely to be read by people leaning more toward executive/high-level positions as opposed to the detail-jugglers who shout at bare metal all day.
See for example this effort at writing a win16 thunking layer in c# https://medium.com/@CantabileApp/implementing-window-messagi...
Wow. Now I'm wondering whether WoW64 does all that, then - one missed API call reference or data structure and boom goes the 32-bit app.
I actually forgot memory managers were a thing when I was writing the parent comment, and momentarily thought the lack of address space translation would mean all 32-bit processes were stuck in the first 4GB of RAM. AST is indeed more of a thunking issue.
Thanks for the info about Win3emu, that's awesome!
Wine works by changing enough of the windows system that the libraries can communicate with the host operating system.
Microsoft already has the 32-bit libraries, 'all' they have to do is make sure the parts of the libraries that interface with the rest of the system do the translation, which is much less work and a reasonably well defined edge.
To me it sounds like somebody fluked it to work and said "wow, it works" and then they called it that!
Windows on Windows
Which is still a pretty good trick, at least when it works.
The idea here is that you can "convert" your mobile device into a powerful desktop, though in reality you are just moving the current, live state from mobile to desktop.
Here's running aarch64 binaries on x86_64 transparently: https://rwmj.wordpress.com/2013/12/22/how-to-run-aarch64-bin...
QEMU has some bad performance penalties, I think partially related to the generic JIT (TCG), extremely strict floating point, and full host memory isolation. ExaGear is significantly closer to native performance but I think only supports emulating 32-bit x86.
Native virtualization dodges a lot of that performance penalty by using the hardware features directly where possible. But that's only really feasible on systems that have nearly identical hardware; x86 is pretty standardized at this point and virtualizes quite well. ARM is much more varied and harder to virtualize, even on other ARM platforms due to differing feature sets.
Many of our critical corporate applications were designed a decade ago -- so you just have to emulate the average desktop performance from those days.
Don't say such evil things.
Spend half my days being frustrated by corporate software. .net software that runs on a modern i7 ultrabook with SSD. Doesn't do anything wild (mostly buttons & menus)...yet its bloody slow. HOW???
A friend showed me the industry-standard database app used to manage most Internet-connected second-hand bookshops (I think).
Its development decisions went something like:
"Hey, let's be sooooo awesome and update the search results live, as you type! Wow, without even a one-second delay this is SO REALTIME - like we're in 2187"
(later)
"Do we need to index the database? ...eh, nah. I don't think our custom database solution even supports indexing. Kay."
In my friend's case the store he's at has tens of thousands of books.
Cue perpetual SSD replacements by all the shops using this software
My approach to using it (when my friend and I were discussing it while I visited) was to hit Win+R to obtain a text box, type my search string, then ^C/ESC/^V it over. The database app would lock up for about 1.2 seconds per keypress.
The button calls into a recently developed micro-service, that calls into a previous-generation SOAP webservice, that sends a message to the enterprise service bus, that then goes to netweaver middleware, that calls into the SAP R/3 backend that has been there since 1992 but was recently upgraded to use an even more expensive database.
Of course, the button has to wait for the response of all this, and blocks the UI while waiting...
I miss WinForms.
For you and I, we want the fastest machines possible, and right now it's x86. For everyone else, I doubt they've even given it a thought, and I don't think they'd notice.
https://play.google.com/store/apps/details?id=com.eltechs.es...
- Anything floating point or SIMD is generally done with a big mass of C helper functions rather than fully inline, and it's always unrolled rather than translated into native SIMD. You can blame qemu's choice to use an architecture neutral IR, but even with that design it could be a lot smarter than it is. In any case, a JIT designed for a specific guest/native architecture combo should be able to produce much more efficient instruction sequences.
- In system mode, qemu has to emulate page tables, which it does by translating every load/store to call a stub that maps the given virtual address to a "physical" one before loading. This is quite slow. User-mode qemu (where qemu is a host-arch Linux process pretending to be a single target-arch Linux process) is faster because it doesn't need to perform any translation itself (the host page tables provided by the native kernel do the job). Here too qemu could be improved - it's possible to use host page tables for full system emulation, though in some cases at the expense of hardware accuracy - but AFAIK Microsoft's emulator is user-mode, so this too isn't an issue.
- Those are only the big issues; I think there are a lot of small cases where there's room to do better than qemu, either in general or by optimizing for a specific architecture pair.
Also, I'm not sure how much this matters, but translating x86->ARM64 has some small builtin advantages over other pairs due to the nature of the ISAs. x86 has few general-purpose registers, while ARM64 has 32, so you can map each x86 register to an ARM register throughout the emulation; going the other way around you need to be constantly shuffling registers to and from memory. And a small one: ret on x86 requires the use of the stack pointer and memory, while ARM64 ret just takes an arbitrary register argument. (In both cases, the visible semantics are the same as a regular indirect jump, but the instructions are optimized to quickly return to the corresponding call instruction using a shadow stack in hardware.) All indirect jumps, including returns, have some emulation overhead because you need to translate the host code address to a native one; it's a bit easier when the host instructions are more flexible.
Apple will stay Apple. I don't think they'll go anywhere.
The question is Google. If this happened in 2008, I don't think Android would have taken off anywhere close to the way it did.
But now? One one hand, Android has millions of apps already on the market. On the other hand, Microsoft now has potentially millions of old, existing, applications.
I don't think it will make a dent in the phone market. It's too commonly used as a hand-held rather than a station, and windows apps are useless there.
On the other hand, it can tank the Android tablet market
However, on the tablet side, it may allow Microsoft to bring down the price of the Surface a bit while still maintaining legacy app compatibility.
My understanding is that Intel caught up with ARM a couple years ago on performance-per-Watt, but how's the idle power consumption of 64-bit Atom processors these days compared to 64-bit ARM offerings? For many consumer use cases, idle power consumption has a bigger impact on battery life than does performance-per-Watt.
I'm a bit sad this news came out after SoftBank bought up my ARM shares, but I'm glad to see more evidence we may yet get the x86 monkey off our back.
But anyway, this emulation will be helpful for cheaper phones. I am holding my breath for that day.
https://twitter.com/evleaks/status/794598340927307777/photo/...
LattePanda demands a 10W power supply (5V@2W), good luck getting that in a phone.
Also, maybe Microsoft will have the guts to do what Google never did: standardize ARM processors, so that all ARM devices can be updated at once. Although I assume Microsoft will also start by supporting "Qualcomm-only" at first, just like it did for phones.
They're already heading for the hills - this just adds to the swamping they're getting in the low ground ...
Microsoft has used a number of minecraft terms as codenames.
RedStone Cobalt