Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!w-edwinh From: w-edwinh@microsoft.UUCP (Edwin Hoogerbeets) Newsgroups: comp.sys.amiga Subject: Re: Memory Protection Message-ID: <8638@microsoft.UUCP> Date: 7 Nov 89 01:13:58 GMT References: <37410@srcsip.UUCP> <8911040008.AA13445@en.ecn.purdue.edu> <1989Nov4.031121.5495@welch.jhu.edu> <410@mohawk.cs.utexas.edu> Reply-To: w-edwinh@microsoft.UUCP (Edwin Hoogerbeets) Organization: Microsoft Corp., Redmond WA Lines: 36 In article <410@mohawk.cs.utexas.edu> bryan@cs.utexas.edu writes: > Resource tracking and memory protection aren't free. Part of the >reason they don't exist in the Amiga is to improve performance. This is the >same reason several "new" OS explicitly support multiple lightweight tasks within the address space of a single process. And how do you propose to do message >passing in the presence of memory protection, hmm? Either the kernel copies >messages between address spaces, or you have to have shared segments that can >be read-only for arbitrary groups of processes. Either way, it's a >performance hit. Resource tracking: I'd like to see ARP do more than just memory. How about an ArpOpenLibrary() and an ArpOpenDevice(), and such. Then, when your program is finished, have an ArpCloseEveryFamousThing(). This way, you can have resource tracking, but only if you need it. I really like the idea someone mentioned a while back of an ExitHandler() routine. When a task starts up, you set a field of the task structure to point to a function in your code that will clean up the mess you have created. This setting would be done, of course, via a SetExitHandler(int (*)())) function or some such abstraction. When the task is finished, the ExitHandler is called, which could do the aforementioned ARP call, and everything would be rosy. I guess that would be a 1.5 wish... (or is it already "in there?" 8-) Message passing: I believe the MEMF_PUBLIC flag to AllocMem() was Commodore's thinking ahead to an OS with protected memory. Message passing could be done the same way it is now, but all messages would have to be allocated as public, for everyone to read. Unrelated questions: When is Manx 5 due? How does one get to be a beta tester for either Manx or Lattice? Edwin