delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/03/13/15:22:38

Comments: Authenticated sender is <alaric+abwillms AT sdps DOT demon DOT co DOT uk>
From: "Alaric B. Williams" <alaric AT abwillms DOT demon DOT co DOT uk>
To: opendos AT mail DOT tacoma DOT net
Date: Thu, 13 Mar 1997 18:27:07 +0000
MIME-Version: 1.0
Subject: Re: [opendos] BAD Filesystems
Reply-to: alaric AT abwillms DOT demon DOT co DOT uk
References: <Pine DOT LNX DOT 3 DOT 95 DOT 970311044656 DOT 741A-100000 AT capslock DOT com>
In-reply-to: <Pine.NXT.3.95.970311162945.5034A-100000@eagle1>
Message-ID: <858277502.1028502.0@abwillms.demon.co.uk>
Sender: owner-opendos AT mail DOT tacoma DOT net

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 <jdashiel AT eagle1 DOT eaglenet DOT com>
 
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019