Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!cmcl2!yale!husc6!mit-eddie!rutgers!princeton!allegra!ulysses!sfmag!sfsup!shap From: shap@sfsup.UUCP (J.S.Shapiro) Newsgroups: comp.sys.intel Subject: Re: comp.sys.intel Message-ID: <866@sfsup.UUCP> Date: Tue, 25-Nov-86 03:12:29 EST Article-I.D.: sfsup.866 Posted: Tue Nov 25 03:12:29 1986 Date-Received: Tue, 25-Nov-86 10:05:13 EST References: <110@wldrdg.UUCP> <13772@amdcad.UUCP> <111@wldrdg.UUCP> <13801@amdcad.UUCP> <2971@rsch.WISC.EDU> Distribution: na Organization: AT&T Information Systems, Summit N.J. Lines: 46 > OK, all you intel hackers, here's a question for you. This will tell > me very quickly if I want to ever deal with segments or not. > > 1) How does virtual to physical (page => frame) mapping occur? Are there > seperate page tables for each segment, or what? (I know, dumb > question). Right. Dumb question. It does the right thing. > > 2) OK, a better question: suppose my process forks (spawns a child) > and I would like to set things up as follows: > > o child gets personal copy of stack. > > o child gets shared copy of text. > > o child gets gets shared (with parent) copy of data addresses > 0x01ffff..0xffffff (for example). > > o child gets personal copy of data addresses 0x1ffffff and above. > > In other words, I want to take the section of memory with virtual > addresses 0x01ffff to 0xffffff and have that shared. Can this be > __easily__ done with the 386 memory management? Seems like it > would be a nice thing to support. Don't forget, there may be > valid data addresses both above and below the segment in question; > you can't split it into two, have to go to three chunks. All easy, though the sharing naturally has to happen in page-sized increments. > > 3) And yet another nifty question: can I make the new non-shared > data segments be copy-on-write? Yes, write protect the pages and use software to figure out what to do. Straightforward. There is also a user-use bit out there to play with in the PTE. > > 4) How about using a segment to catch stack overflow? Dynamically altering > segment size? From user mode? Supervisor mode? After or during > allocation? There is a stack segment size notion.