Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!cuae2!killer!elg From: elg@killer.UUCP Newsgroups: comp.sys.amiga Subject: Re: "kill" Message-ID: <1422@killer.UUCP> Date: Fri, 28-Aug-87 00:32:19 EDT Article-I.D.: killer.1422 Posted: Fri Aug 28 00:32:19 1987 Date-Received: Sat, 29-Aug-87 16:52:35 EDT References: <1708@amiga.amiga.UUCP> Organization: Bayou Telecommunications Lines: 52 in article <1708@amiga.amiga.UUCP>, bart@amiga.UUCP (Barry A. Whitebook) says: > this is amiga!bart: just a little background on why there is no "kill" > (and why memory gets fragmented...) [bunches of reasons] > this posting is not to discourage the thought of a "better" solution: > but as long as we have no MMU... > > bart. I'm in the midst of a multitasking kernal right now, somewhat similiar in concept to the Amiga's except a bit simpler, and I, too, at first saw no easy way to keep track of all resources. First, there's message ports. Well, these are part of the kernel, so the kernel can send a "process killed" message through open ports, and the i/o manager et. al. could handle gracefully closing files and so forth. So that handles tracking i/o. Then, there's memory management. It is possible to tag each block of memory here with a process number, just like above, and tell the malloc that process xyz died and add its memory to the freelist. However, this would also require linking together all the used blocks of memory into a "usedlist". So we're talking about 3 bytes of overhead for each block of memory. So how large is the average block of memory in an Amiga? I dunno. Then there's the bytes used for messages. You'd have to say that they were part of the memory of the sending process, because generally "C" malloc library routines request a large amount of memory and subdivide it. So the first task upon killing the process will have to be emptying out any pipes that have messages pending from this process, because they are null and void... Since my project is for a dedicated environment, on a machine that I won't disclose for fear of being laughed out of this newsgroup, I'll never have to face any of those questions. But, whereas I started out skeptical that resource tracking was possible, I am now much more optimistic... I/O: DOS keeps track of what process associated with what file, for orderly shutdown. "kill" routine sends some sort of KILL packet with associated procid, telling it who to zap. Message ports: Message port handler keeps track of these. Things can get hairy here with "KILL" packets and "deadly embrace" and such, but all in all, things can be made managable. Memory: Tag blocks with process IDs. Have "usedlist" as well as freelist so that killr can find the tagged blocks when killing RAM. problems: overhead. Depends on how big of blocks applications request. So there's the three major resources of the Amiga, tracked on a per-process basis. So it SHOULD be possible, WITHOUT a MMU. It just all depends on how braindamaged the DOS REALLY is, as to whether it's possible ON THE AMIGA.... -- Eric Green elg@usl.CSNET Do-it-yourselfer's maxim: {cbosgd,ihnp4}!killer!elg Don't force it, use a bigger hammer! Snail Mail P.O. Box 92191 Lafayette, LA 70509