Hacker News new | ask | show | jobs
by JoshTriplett 3789 days ago
You could add a CPU write buffer or cache lines as an intermediate step between the code and memory, and allow the player to choose when those get flushed to memory, constrained by memory barrier operations.

This kind of problem comes up very often in the context of the Linux kernel. And the ability to deal with it is as even rarer among programmers experienced with concurrency than experience with concurrency is among programmers in general. A tutorial of this form for memory ordering issues would be invaluable.

I'd be happy to help with problems and game-element design for a memory-ordering version of this tutorial.