Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!bloom-beacon!tut.cis.ohio-state.edu!kayak.cis.ohio-state.edu!martens From: martens@kayak.cis.ohio-state.edu (Jeff Martens) Newsgroups: comp.sys.amiga.tech Subject: Re: Task KILL for Amiga Message-ID: <32094@tut.cis.ohio-state.edu> Date: 20 Jan 89 13:08:30 GMT References: <3716@crash.cts.com> <10908@s.ms.uky.edu> <5713@cbmvax.UUCP> <10926@s.ms.uky.edu> Sender: news@tut.cis.ohio-state.edu Reply-To: Jeff Martens Organization: Ohio State University Computer and Information Science Lines: 37 In article <10926@s.ms.uky.edu> sean@ms.uky.edu (Sean Casey) writes: [ stuff deleted ] >Why? Seems to me that resource allocation is an infrequently done thing. Resource allocation is infrequently done in a language like FORTRAN which has a static view of the world and doesn't allow users to allocate and deallocate memory. In something more modern, like Modula 2, Pascal, Lisp, or C, this is no longer true. Consider linked lists, trees, etc.; to manage these sorts of structures in an application program you're continuously grabbing new memory and (hopefully) returning it to the system when you're done with it. Even if you're just running FORTRAN or BASIC, the translator is going to allocate memory dynamically. >It also seems to me that resources could be tracked with bitmaps. Where >is the serious speed/memory degradation? OK. Let's keep track of every byte of RAM in the Amiga. If we allow for 8MB of RAM, then we need an 8Mb map, which comes to a megabyte. The alternatives are to increase the granularity of our map or keep it on disk. It won't fit on a floppy, and even on a hard drive performance would be hampered. If we increase the granularity to, say, a "paragraph" (Intel's term for 16 bytes if memory serves), then 8MB is thought of as 512k paragraphs, so the bitmap can fit in 64kB. This is still a considerable amount of memory, and results in wasted space if the user doesn't use memory in 16 byte chunks. Of course, it's not necessary to worry about memory that's not actually present. Assuming memory's allocated on a word basis, though, a sixteenth of your memory's gonna be just bitmaps, and this is pretty significant. [ more stuff deleted ] -- Jeff (martens@cis.ohio-state.edu)