Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's an excellent point.

I hope the answer is not "by restricting all emulated threads to one CPU core".



My off-the-cuff guess is they just force a memory/inst fence where x86 makes guarantees which is a bit better but still incurs some overhead.

Visual Studio used to(probably still does) this around volatile for x86 which leads to fun bugs when you port to ARM/etc.


That'd basically be putting a barrier on every memory access though.


Nah, because ideally most applications are using library/system services to fence their data structures. For the remaining cases the apps could be marked with a new application compatibility flag (this feature already exists in windows for older apps) which adds additional checking that flags pages which are being accessed from multiple contexts as requiring additional emulator level sequencing. There are ton of strategies here, which could be as simple as basically disabling multi threading in the emulator or a page ownership ping/pong, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: