Re:A future for fork(2)
by k2k9 on Friday October 05, 2018 @07:34AM
(#18147272)
hm, if in posix systems a thread inherit "The entire virtual address space of the parent is replicated in the child" that means actually that context switch between threads among one process is not that costly (TLB cache stays intact for example). Am i right?
[ Parent
| on HN ]
It is surely faster than windows. But I don't think the TLB stays intact: You have to redo all page tables etc.., as every memory write will cause a copy on-write (if one process writes to memory, it gets a copy of the memory and the other process never sees the write)
Copy on write is for fork. Threads share memory, so you specifically don't want to CoW.