Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!decwrl!decvax!ima!johnl From: johnl@ima.ima.isc.com (John R. Levine) Newsgroups: comp.arch Subject: Re: 386/486 Virtual Memory Question... Summary: 386 segments aren't very useful Message-ID: <4056@ima.ima.isc.com> Date: 12 Jun 89 16:46:58 GMT References: <243@mipos3.intel.com> Reply-To: johnl@ima.UUCP (John R. Levine) Organization: Segue Software, Inc. Lines: 25 In article <243@mipos3.intel.com> sundar@mipos2.intel.com (Sundar Iyengar~) writes: >Page 2-2 of the 80386 Programmer's Ref Manual >says this: "Applications programmers view the logical address space of >the 80386 as a collection of 16,383 one-dimensional subspaces, each >with a specified length [ranging] from one byte upto a maximum >of 2^32 bytes". Unfortunately, since all 2^46 addresses are mapped through a page table with only room for 2^32 addresses, the 386's segmentation is considerably less useful than it might otherwise be. If, for example, you did the obvious unix trick of putting your static data and heap at the low end of a segment where it can grow up, and your stack at the high end of the segment where it can grow down, you have to map all 2^32 addresses in that segment into the page table, but that doesn't leave room for anything else. Oops. A single process' address space is limited to 2^32 simultaneously mapped addresses. In theory you could have a larger total address space and play games with mapping segments in and out, but that puts strange limits on applications as to which segments they can reference at the same time, so in reality the limit translates to 2^32 total addresses per process. Unix systems map all segments to the same place and just use the paging. -- John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 492 3869 { bbn | spdcc | decvax | harvard | yale }!ima!johnl, Levine@YALE.something Massachusetts has 64 licensed drivers who are over 100 years old. -The Globe