From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,1720d3e3693bee24 X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,b1738035b01d4980 X-Google-Attributes: gid1164f8,public From: billm@cygnus.com (Bill Moyer) Subject: Re: address spaces Was: Why not Solaris on Alpha? Date: 1997/06/27 Message-ID: <5p14rt$gfk$1@andros.cygnus.com>#1/1 X-Deja-AN: 253036591 References: <5mrt16$eo3@percy.cs.bham.ac.uk> <20JUN199705131884@gerg.tamu.edu> <33AAB31E.64786744@amcfac.enet.dec.com> <33B3FCD9.6113@nas.nasa.gov> Organization: Cygnus Support, Mountain View, CA Newsgroups: comp.sys.dec,comp.arch In article <33B3FCD9.6113@nas.nasa.gov> Hugh LaMaster writes: > >I still don't understand why this needs to be done by the >hardware's virtual address mechanism, as opposed to >being handled by a data structure which maps the >aforementioned "address" onto the hardware's virtual >address. How many such addresses would there be, >how sparse would they be, etc. etc. - in other words, >what is the application and what are *its* requirements? There are a few reasons.. It's slower, for one, to use virtual memory which was implemented in software. It also requires that the programmer uses some sort of API instead of simply writing code which reads/writes memory locations, unless your compiler "knows" about your special memory access semantics and writes in the necessary code at compile-time. C++ can partially hide this, but not entirely. If a technique isn't convenient for the programmers, they won't use it, it will never catch on as a de facto standard, and you will not see software appearing on the shelves which benefit from the technique. On the other hand, if you really want to use an N-bit virtual memory space for some ADT, and the hardware you're working on doesn't support it, or you're writing platform-independent code which has to run on the lowest common denominator, then rolling your own virtual memory in software is a fine idea. You can even implement additional features which wouldn't be practical to implement in hardware. If you hide the details of the imple- mentation behind a well-generalized interface then it will be more readily used by other programmers, too. -- ttk@cygnus.com --