Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!att!cbnewsh!dwc From: dwc@cbnewsh.att.com (Mordecai the Fowl) Newsgroups: comp.arch Subject: Re: Paging page tables Message-ID: <1990Jun29.213236.4888@cbnewsh.att.com> Date: 29 Jun 90 21:32:36 GMT References: <3300142@m.cs.uiuc.edu> <4137@taux01.nsc.com> Organization: Coop for Organized Adhocracy Lines: 36 In article <4137@taux01.nsc.com>, amos@taux01.nsc.com (Amos Shapir) writes: > In article <3300142@m.cs.uiuc.edu> march@m.cs.uiuc.edu writes: > > A simple calculation: 32-bit addresses cover 4GB; when using pages > of 4KB (which are rather large as paging systems go) you have > to keep 1M PTE's, which occupy 4MB. The need to page these is > of course proportional to the amount of virtual memory used vs. the > amount of physical memory that can be tied down in PTE's. > note that with a combination of segmentation and paging, you don't need a fully allocated set of page tables for your entire address space. the page tables themselves can be sparsely allocated. it also seems that the only information you need in the page table upon process swapout is whether a particular page was part of the swapout since the page tables can be rebuilt on swapin. you probably want to keep other things such as modified bits but don't need to keep the reference bit unless you are a perfectionist. what this means is that since you don't need to keep the mapped frame number (which is no longer a valid page frame number anyway), the page table representation can be much more compact when a process is swapped. whether you still want to swap this compacted representation of the page table (or whether you actually want to compact the page table instead of just swapping it) is another design issue. also, i believe that as long you keep a record of the size of the swapped image, and in the swapped image you keep information to distinguish the page tables from the actual pages, you can still rebuild all the information in a single (logical) I/O. so swapping the page tables out doesn't cost you much incrementally. all this assumes we are dealing with private pages. don't ask me how to deal with shared pages in a general way. danny chen att!hocus!dwc