Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!+ From: Richard.Draves@CS.CMU.EDU Newsgroups: comp.os.mach Subject: Re: Memory Management Question (HAT/IPT) Message-ID: Date: 11 Jan 90 17:27:44 GMT References: <3532@hub.UUCP> Sender: rpd@M.GP.CS.CMU.EDU Distribution: usa Organization: Carnegie Mellon, Pittsburgh, PA Lines: 31 In-Reply-To: <3532@hub.UUCP> Excerpts from netnews.comp.os.mach: 11-Jan-90 Memory Management Question .. Bijan Forutanpour@yosemi (1168) > I had a question to ask those who are familiar with the HAT / IPT, and SEGMENT > TABLES... This is for MACH running on the IBM PC RT, but I'm not sure if > that is > is too relevent here. > I'm trying to figure out exactly what virtual addresses are translated to what > physical addresses. > Please correct me if I'm wrong about the following: You seem to be asking about the address space seen by a user task on an RT. Segment F is the IO address space. Segment E is the kernel text and data structures. The kernel text (small addresses in segment E) maps directly onto low physical memory. Kernel text is always readable; kernel data is only accessible during system calls. Segment D is stack. Segment 0 is program text. Segment 1 is program data. This organization was taken from IBM's Acis/4.3 Unix so that Mach can run Acis binaries. When you vm_allocate() memory, the kernel will look for unused parts of the address space; the part of the kernel that does this doesn't know about the segmentation. The effect is to first allocate from the unused part of segment 0, then segment 1, segment 2, etc. The malloc heap starts in segment 1. The pmap module manages the translations from virtual to physical memory. Rich