Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!sunybcs!ugkamins From: ugkamins@sunybcs.uucp (John Kaminski) Newsgroups: comp.os.minix Subject: Re: Swapping (was Re: Blitter with fork) Message-ID: <5647@cs.Buffalo.EDU> Date: 3 May 89 05:59:59 GMT References: <1164@uvm-gen.UUCP> Sender: nobody@cs.Buffalo.EDU Reply-To: ugkamins@sunybcs.UUCP (John Kaminski) Organization: SUNY/Buffalo Computer Science Lines: 33 In article <1164@uvm-gen.UUCP> ackerman@kira.uvm.edu (Steve Ackerman) writes: =>and the memory demands invoke the swapper, elle, will be chosen for =>swap out. If, during the time that elle is swapped out, a user hits a =>key, the TTY driver will attempt to copy the typed character directly =>to the user address space; therefore, encountering the same problem as =>before. Again, a work around scheme has been developed (a kludge if =>you will). => =>There are more instances of this type of occurance. For example, I =>believe the Printer driver will read directly from the process' data =>space. Other problems include a few race conditions that need to be =>hammered out. Also, I'm not sure what will happen when a process is =>blocked on a pipe, but I suspect the same type of problem as the TTY =>driver. => =>This brings me to my question - Does anyone have a better solution =>than to go through the code, find all the places where this type of =>problem occurs, and provide a work around? I think that if the =>swapper was operating in a protected mode environment, a write/read =>from a swapped out segment would generate an exception that could be =>caught, but I'm not sure (don't have my 286/386 book with me, so I =>can't look it up!). But the problem still remains in Real Mode. I =>think the problem would exist on the Atari version as well. Anyone =>have a suggestion? how 'bout tweaking the code for phys_copy, send_rec, etc. instead of worrying about individual instances? Does any of the MINIX code *NOT* use these sys- tem routines? I think it highly unlikely that it would. I would think that swap information is a new part of the process table, and therefore you could access the swap info when doing a send_rec() for instance. Hey, I know this might sound obvious, but sometimes the obvious can seem soooooooooo concealed until a fresh set of eyes looks at the problem.