Mail Archives: opendos/1997/03/13/15:22:38
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 -