🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11111

Re: Task KILL for Amiga

#11111
From: Neil Webber
Date: Sun, 22 Jan 1989 00:14
47 lines
2913 bytes
>In article <10908@s.ms.uky.edu> sean@ms.uky.edu (Sean Casey) writes:
>Hmmm. Why not? Doesn't AmigaDos keep track of owned resources?

and Randell Jesup (of Commodore) replies
>	No, not in general.  It can get expensive in memory/spped to do so.

I do hope this isn't Commodore's "official" position on this topic.

Obviously, the resources *are* being tracked -- it's just that currently
each and every program is tracking its own resources (or so you hope!)

Forcing everyone to track their own:
	a) prevents the implementation of KILL, a clearly needed feature.
	b) is a fertile source of bugs
	c) really grosses up your code (just look at the error handling
	   and cleanup in any RKM example).

In Article <32094@tut.cis.ohio-state.edu> Jeff Martens adds:
>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.

No existing programs track their own memory allocations that way
(at least, I hope not!).  The OS wouldn't do it that way either.
Nor would it do it in 8 or 16 byte chunks.  It would do it the same
way every current program is forced to do it.  It won't be ANY slower.
It won't take up ANY additional memory.  It could, in theory, save
memory since the code to manage this junk wouldn't be duplicated in
every program.  It would make the system more robust.

People will object that the Amiga programming model sometimes
requires a program to allocate resources, and pass them off to
another program, and sometimes the original allocating program
exits, and you don't want the resource freed.  This is not at
all a show stopper.  It is possible to design system interfaces
that provide this capability.

I've done all of this for a small proprietary OS, including the
bit about passing resources between tasks.  It really doesn't
take more memory and it really doesn't cost you execution speed.
All :-) it takes is extra effort when designing and implementing
the system.  Maybe you don't have the time for that, so you
ditch resource tracking to get the product out sooner.  That's
OK.  But saying "AmigaDOS doesn't track resources because it
would be too expensive in memory or speed to do so" doesn't wash.
-- 
Neil Webber / Epoch Systems, Marlboro MA / (508) 481-3717
        {harvard!cfisun, linus!alliant}!palladium!nw
Technical Details
Message-ID: <619@palladium.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!bu-cs!mirror!ima!cfisun!palladium!nw
References: <3716@crash.cts.com> <10908@s.ms.uky.edu> <5713@cbmvax.UUCP> <10926@s.ms.uky.edu> <32094@tut.cis.ohio-state.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!bloom-beacon!bu-cs!mirror!ima!cfisun!palladium!nw
From: nw@palladium.UUCP (Neil Webber)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Task KILL for Amiga
Summary: resource tracking is not automatically expensive
Message-ID: <619@palladium.UUCP>
Date: 22 Jan 89 00:14:22 GMT
References: <3716@crash.cts.com> <10908@s.ms.uky.edu> <5713@cbmvax.UUCP> <10926@s.ms.uky.edu> <32094@tut.cis.ohio-state.edu>
Reply-To: nw@palladium.UUCP (Neil Webber)
Organization: Epoch Systems, Marlborough, MA
Lines: 47