Comments: Authenticated sender is From: "Alaric B. Williams" To: opendos AT mail DOT tacoma DOT net Date: Thu, 13 Mar 1997 18:27:07 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: [opendos] BAD Filesystems Reply-to: alaric AT abwillms DOT demon DOT co DOT uk References: In-reply-to: Message-ID: <858277502.1028502.0@abwillms.demon.co.uk> Sender: owner-opendos AT mail DOT tacoma DOT net Precedence: bulk On 11 Mar 97 at 16:43, jdashiel AT eagle1 DOT eaglenet DOT com wrote: > When an uninstall happens, > each associated app count number is decremented by 1. > Only when a shared lib has an app count of zero can it be removed from > the disk safely. This problem is actually one of garbage collection. Garbage collection is a type of storage management where, unlike C's malloc/free system, software is not expected to free up resources it allocates because the system uses algorithms such as the one above to decide what objects are not referenced, and as such can be deleted. Now, the above method is known as reference counting, and in the incarnation given is OK except that apps can't refer to each other, and neither can libs; there is a fixed division of things into two types, with restrictions placed over what accesses what. Shared libs could well want to use other shared libs, and apps often refer to other apps in the Unix model, invoking them with popen() and all that to do some useful work. If we drop the distinction and just have "resources" which can link to each other with reference counts, problems arise, since circular chains are never destroyed; perhaps an encryption module (gzip) may register with the encryption module interface DLL (compression_manager), which in turn then refers to gzip so it can invoke it as a compression module. Even if no other references point to that pair, they still reference each other... in this case, since gzip is an application, it is always considered referenced by the user, but in another situation the system would not spot a removeable file when it could! Other, more advanced, techniques come into play. > jude ABW -- Governments are merely protection rackets with good images. Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk http://www.abwillms.demon.co.uk/