How to Use a 64-Bit Virtual Address Space
Total Page:16
File Type:pdf, Size:1020Kb
How to Use a Bit Virtual Address Space Jerey S Chase Henry M Levy Miche BakerHarvey and Edward D Lazowska Department of Computer Science and Engineering FR University of Washington Seattle WA Technical Rep ort Abstract Most op erating systems execute programs in private address spaces communicating through messages or les The traditional private address space mo del was develop ed for and bit architectures on which virtual addresses are a scarce resource The recent app earance of architectures with at bit virtual addressing op ens an opp ortunity to reconsider our use of virtual address spaces In this pap er we argue for an alternative addressing mo del in which all programs and data reside in a single global virtual address space shared by multiple protection domains Hardwarebased memory protection exists within the single address space providing rewalls as strong as in conventional systems We explore the tradeos in the use of a global virtual address space relative to the private address space mo del We contend that a shared address space can eliminate obstacles to ecient sharing and exchange of data structures that are inherent in private address space systems The shared address space oers advantages similar to some capabilitybase d computer systems but can b e implemented on standard pagebased hardware without the p erformance costs and restricted data mo del typical of capabilitybas ed systems We intro duce Opal an op erating system to supp ort this mo del on paged bit architectures The key feature of Opal is a at virtual address space that includes data on longterm storage and across the network Intro duction The rapidly increasing demands of software b oth applications and op erating systems together with in creasing VLSI densities have brought us to the verge of a ma jor architectural change the move from a bit to a bit virtual address space This trend can b e seen for example in the architectures of the HP PARISC Lee and the IBM RS Groves Oehler The MIPS R MIP and Digitals recently announced Alpha family Dobb erpuhl et al are the rst architectures with unsegmented bit address spaces Unlike the move from to bit addressing a bit address space could b e revolutionary instead of evolutionary with resp ect to the way op erating systems and applications use virtual memory Consider that bits can address a terabyte two orders of magnitude b eyond the primary and secondary storage capacity of all but the largest systems to day More signicantly a full bit address space consumed at the rate of megabytes p er second will last for nearly years Such large address spaces eliminate the need to reuse addresses in order to supply each executing program with sucient name space invalidating a basic assumption that has driven op erating system design since the s The purp ose of this pap er is not to argue in favor of the architectural change to bit addressing we simply assume that wideaddress architectures will app ear indep endently of how op erating system designers decide to use them Instead our purp ose is to argue that op erating systems should take advantage of these wider addresses by supp orting a single global virtual address space that maps all data in the system The This work is supp orted in part by the National Science Foundation under Grants No CCR CCR CCR and CDA by the Washington Technology Center by the Bo eing Corp oration and by Digital Equipment Corp oration through the Systems Research Center DECwest Engineering the External Research Program and the Graduate Engineering Education Program system could b e a distributed memory computer or even a large network though we do not explicitly discuss distribution issues in this pap er In this pap er we explore the costs and b enets of this mo del the uniformaddress model by comparing and contrasting it with the memory addressing mo del used in most op erating systems to day the process based model Both mo dels dene the concepts of address space the virtual addresses used by an executing pro cessor to name op erands in memory and protection domain an execution context that restricts the 1 pro cessors access to memory They dier only in their view of the relationship b etween these concepts Processbased systems or private address space systems equate the notions of protection domain and address space combining them into a single concept known as a process in Unix or Multics a task in Mach and an actor in Chorus In these systems every protection domain has its own address space Uniformaddress systems or single address space systems execute all protection domains in a common paged virtual address space containing all data The notions of address space and protection domain are fully indep endent As an example of the uniformaddress mo del we intro duce Opal a distributed op erating system that we are building An Opal protection domain is in many ways the analog of a Unix pro cess or Mach task for example there is typically one protection domain p er executing application containing some private data threads and RPC connections to other domains The dierence is that an Opal domain has a private set of access privileges for globally addressable pages rather than a private virtual naming environment Domains may grow shrink or overlap arbitrarily by sharing or tranferring page p ermissions among themselves Opals at virtual address space includes data on longterm storage and across the network In general a given piece of data app ears at a xed virtual address indep endent of where it is stored or which domains access it No sp ecial hardware supp ort for Opal is assumed or required Our architectural assumptions are an unsegmented paged virtual address space bit virtual addresses with or more meaningful bits ecient sparse use of the address space supp ort for multiple protection domains that control access to data on a page granularity and no constraints on virtual address usage within a protection domain These conditions could b e met by simply extending the addressing widths on a conventional paged architecture with a softwareloaded translation buer such as the MIPS R We b elieve that Opal could run eciently on DEC Alpha and MIPS R pro cessors Why a Single Address Space The key prop erty of a uniformaddress system is that virtual addresses are contextindependent the meaning of a virtual address is indep endent of the entity issuing that address We have noted else where Koldinger et al that contextindep endent addressing frees pro cessor hardware from the need to supp ort multiple sets of address translations allowing optimizations in the memory system notably the troublefree use of a virtually addressed data cache In the software contextindep endent addressing sim plies the sharing storage and retrieval of data esp ecially structured data containing emb edded p ointers It is this improved supp ort for sharing that we are concerned with in this pap er This section previews the main p oints of our argument Our notion of sharing is quite general sharing o ccurs whenever a domain uses data or code that is created by some other domain By this denition sharing is common Sharing can b e sequential as well as concurrent so it encompasses data transfer from one domain to another through messages or les Distributed communication and longterm storage are sp ecial cases of sharing b etween domains in which the domains are physically separated by a network or their lifetimes are disjoint Pro cessbased systems intertwine naming and protection in a way that limits their ability to supp ort sharing eciently The problem is that each domain cho oses addresses for shared data indep endently of other domains in general this means that the pro ducer and consumer of data use names inconsistently 1 We also use the term protection domain informally to denote the collection of data that is accessible from such an execution context or to refer to a pro cessor executing in the context Section will show that these naming problems cause extra overheads when data is shared such as excessive data copying and software p ointer translation Programs may b e structured to make unnecessary cross domain RPC calls b ecause sharing is dicult to implement A single address space system separates naming and protection simplifying sharing in two ways First virtual addresses can b e passed b etween domains any byte of data can b e named with the same virtual address by any protection domain that has p ermission to access it Second domains can imp ort data containing emb edded virtual addresses without risk of a name conict with other data already in use by the domain These prop erties make it easier to implement sharing as direct sharing of a single copy of the data Sharing and Trust Improved supp ort for direct sharing is b enecial even if there is no explicit interaction b etween protection domains For example an Opal domain can dynamically attach to shared co de mo dules in any combination without runtime linking Section More imp ortantly direct sharing can b enet domains that are co op erating in some way Why do protection domains need to co op erate or share data We generally think of each domain as executing a selfcontained application but in fact there are several reasons why interacting software comp onents might run in separate protection domains Providing a service to multiple users Servers are protected from their clients to prevent a client from interfering with service to other clients Accessing a database shared by multiple users To ols for directly accessing a common database