Xref: utzoo comp.unix.questions:29416 comp.unix.wizards:24441 comp.unix.internals:2333 Path: utzoo!news-server.csri.toronto.edu!rutgers!usenet!ogicse!cvedc!mcspdx!adpplz!martin From: martin@adpplz.UUCP (Martin Golding) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.internals Subject: Re: why different swapping modes on executables? Message-ID: <573@adpplz.UUCP> Date: 13 Mar 91 20:27:43 GMT References: <1991Mar12.012401.557@nowhere.uucp> <1991Mar12.104352.23097@kithrup.COM> Followup-To: comp.unix.questions Organization: ADP Dealer Services R&D, Portland, OR Lines: 26 In <1991Mar12.104352.23097@kithrup.COM> sef@kithrup.COM (Sean Eric Fagan) writes: >In article <1991Mar12.012401.557@nowhere.uucp> sking@nowhere.uucp (Steven King) writes: >> While I think I understand what the difference is, I don't understand >> why the difference. Is there any advantage to one over the other? How >> does one, short of directly editing the binary, assign one or the other? >> ( the link editor doesn't offer any clues ) >At one point, the linker would just willy-nilly put things back to back. >For example, text might end at 0x1231, and data would then begin at 0x1232. >When paging, you do *not* want to use old data. Therefore, if you want to >page directly from disk, you arrange things such that everything is in a >decent arrangement (which is what your kernel would do for you when it >swapped pages to the swap device). In the very bad old days, PDP 11's had two ways to map memory: one combined the data and program in a single 64k segment, and one had separate (64k) data and program spaces. Given the addressing modes, the difference between data and program accesses were a study in themselves. My impression is that the (original) version of the Magic Number was the actual value to load into the PDP 11 MMU control register, to select one or the other model. Martin Golding | sync, sync, sync, sank ... sunk: Dod #0236 | He who steals my code steals trash. {mcspdx,pdxgate}!adpplz!martin or martin@adpplz.uucp