Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!jarthur!uunet!caliban!ig From: ig@caliban.uucp (Iain Bason) Newsgroups: comp.arch Subject: Re: Segmented Architectures ( formerly Re: 48-bit computers) Message-ID: <1991Mar29.044033.222@caliban.uucp> Date: 29 Mar 91 04:40:33 GMT References: <23189@as0c.sei.cmu.edu> <1991Mar27.193512.12417@cello.hpl.hp.com> Organization: none Lines: 62 This whole discussion on segmented architectures is getting a little confusing. The problem is that most posters seem to be drawing conclusions about segmentation in general based upon their knowledge of particular segmented architectures. Now, there's nothing wrong with basing one's opinions on one's experience. However, I for one am not very familiar with any segmented architectures, and I'm having trouble trying to discern what these various architectures look like. So, why don't we try to debate several specific issues separately? For instance, (a) Should high-level languages try to hide the nature of machine addressing from the programmer? (Of course, that can bring on a debate over whether C is a high level language, and we can waste some more bandwidth.) (b) Should the segment number be manipulated separately from the offset (i.e., should we have segment registers)? (c) What should happen when a pointer in one segment is subtracted from a pointer in another segment? (d) What should happen when the addition of an integer to a pointer results in the overflow of the pointer's offset part? (e) Should segment sizes be fixed or variable? That is, should the number of bits devoted to the offset in a pointer be fixed or variable? (f) What impact will the answers to the above questions have on cache design, MMU design, or world peace? My best guesses right now: (a) No. (And maybe :->.) (b) It depends on how many segment registers you allow. With a sufficient number the compiler can avoid swapping segment registers. However, the only benefit I can think of for keeping them separate is to reduce the amount of memory a pointer consumes, which doesn't really seem that important these days. The big problem (as far as I can tell) is that a pointer aliases a number of different objects. That is, pointers don't uniquely identify objects. (c) I don't know. It seems simplest just to concatenate the segment and offset and treat the combination as an integer. (d) Anything but wrap the offset around without changing the segment. I don't see how that can make sense in any reasonable model. (e) Fixed and large seems usable and implementable. (f) I don't know. Nothing obvious here that I can see. By the way, I am not convinced that segmentation is a good thing, regardless of the answers to these questions. I hope that by considering various aspects of segmentation we can decide what benefits it can bring, and what costs it bears. -- Iain Bason ..uunet!caliban!ig