Messages in this thread | | | Subject | Re: Threads and the LDT (Intel-specific)? | Date | Sun, 10 Jun 2001 15:40:59 -0300 | From | Jeff Dike <> |
| |
smlong@teleport.com said: > I'm trying to do something a bit unorthodox: I want to share the > address space between threads, but I want a certain region of the > address space to be writeable only for a particular thread -- for all > other threads this region is read-only.
UML does this in a somewhat portable (but strange) way. Threads don't share address spaces, as far as the OS is concerned, but the areas where the executable is mapped in are copied to a file, those areas are mapped out, and the files mapped shared in their place. This happens once, in the first thread, and all subsequent threads get the executable mapped shared automatically, even though they are separate processes and separate address spaces from the point of view of the kernel.
So, once this is set up, a thread just makes an area read-write (or readonly) and that mapping is private.
Jeff
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |