Mill Computing, Inc. › Forums › The Mill › Tools › Operating Systems › Fork
- AuthorPosts
- #244 |
So, a topic that I know I’ve been wondering about regarding the Mill’s memory subsystem. How does it deal with Unix fork calls? The two resulant processes could potentially each have a whole mass of pointers with identical numerical values, and they’ll now have to point to different locations in memory, which would seem to be inconsistant with the Mill’s memory model. Now, forks that aren’t followed by execs are pretty rare but I don’t see that this is something that can just be ignored.
Threads, vfork(), page aliasing, and copy on write all appear easy enough with mill mechanisms already described. fork() has the added complication of getting pointers defined by the parent to work with the child address range. My best guess is something along the lines of segments might be used. Done right the segments might be transparent to the application a majority of the time.
As described in the Memory talk, page aliasing and COW work straightforwardly, although with one catch on the Mill: an unwritten COW page will have only one copy in memory because the physical address is aliased, but any lines in cache will be duplicated because the virtual addresses differ even though the data will be the same 🙁
- AuthorPosts
You must be logged in to reply to this topic.