Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!texsun!pollux!killer!elg From: elg@killer.Dallas.TX.US (Eric Green) Newsgroups: comp.sys.amiga Subject: Re: OS/2 vs AmigaDOS Message-ID: <8078@killer.Dallas.TX.US> Date: 11 May 89 06:53:23 GMT References: <11609@well.UUCP> Organization: The Unix(R) Connection, Dallas, Texas Lines: 49 in article <11609@well.UUCP>, ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) says: > In article <6796@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: >> One problem with VM: Forbid()/Permit() and Disable()/Enable(). >>If you allow another task to run when a Forbidden task takes a page fault, >>then the Forbid() is broken. This is compounded by the fact that There are those of us who would say "So what?". Forbid/Permit, in my experience, are most often used when grabbing a system resource. Breaking it only hurts if you access one of those resources. Since the only program accessing the SCSI resources is the HD driver, breaking it thus isn't much of a problem. On the other hand, there are some programs which use Forbid/Permit around timing-critical code, e.g. a program which twiddles the printer port to do weird and wonderful things such as a 1541-style bus. I can see where there'd be a problem there, alas... >> Disable is, of course, worse. Understatement of the year ;-). > Then establish the following rule by fiat: > > "If you take a page fault while Forbid()den or Disable()d, you > crash." Sorry, Leo, that breaks the First Commandment: "Thou Shalt Not Break Existing Programs." I sort of like the solution that Dave Haynie suggested -- adding a flag to the task structure that says, "You can put me into virtual memory." This info would have to be put where it could be accessed by e.g. AllocMem. If this flag is not set, the program's pages are locked into "real" memory. This would require MAJOR hacking to AllocMem, basically adding the resource tracking that everybody so clamors for (if you get eight AllocMem calls for 8-byte structures for task X, you don't want to allocate 8 pages!), plus some hacking of hacking of the task switcher (boy, I'm glad y'all said "Don't mess with the Process structure!" because adding another flag to the Task structure will make the offsets wrong for existing programs accessing the Process structure). By the way, that's not a violation of the First Commandment, since CATS has been saying for the past couple of years that the Process structure will probably change.... -- | // Eric Lee Green P.O. Box 92191, Lafayette, LA 70509 | | // ..!{ames,decwrl,mit-eddie,osu-cis}!killer!elg (318)989-9849 | | // Join the Church of HAL, and worship at the altar of all computers | |\X/ with three-letter names (e.g. IBM and DEC). White lab coats optional.|