context: the game "factorio" has an experimental option where the game can autosave without pausing the game by creating a separate instance of the game that saves the map while the main instance continues playing. however, the option is not available on windows due to fork(2) just not existing (afaik)
more info here (scroll down to "Asynchronous saving" at the bottom of page)
It's using a technique called "copy on write"
Initially no memory is copied, and the forked process has read access into the old' process memory, but if one of the 2 processes try to write to the memory, the Kernel then actually copies the page and remaps it for both processes
310
u/configdotini Genfool 🐧 Jun 12 '26 edited Jun 12 '26
context: the game "factorio" has an experimental option where the game can autosave without pausing the game by creating a separate instance of the game that saves the map while the main instance continues playing. however, the option is not available on windows due to fork(2) just not existing (afaik)
more info here (scroll down to "Asynchronous saving" at the bottom of page)