[gclist] The requirments of finalizers and their consequences.

Mark Tillotson markt@harlequin.co.uk
Tue, 15 Oct 1996 14:33:28 +0100


> "Everyone seems to agree that finalizers need to be sure.
> Everything constructed need to be finalized if only at
> end of job."
> 
> I disagree with that, too.  Ideally there should be no need to release
> resources at process termination.  If there is such a need, then a crashed
> process will leak.

That's purely a local consideration - if the resource involves another
party across the network, then you do, in general, want orderly
shutdown via a finalization protocol - the alternative is to force the
other end hang around on a timeout unsure if the process has crashed
or if its just a network glitch.  (well OK, many protocols have provision
for tear-down for precisely this reason)

Furthermore there are resources which are not temporarily owned by a
process, but explicitly created and later removed at finalization
(lock files, temporary files, etc) which can't be deallocated
automatically by the kernel.

__Mark
[ markt@harlequin.co.uk | http://www.harlequin.co.uk/ | +44(0)1954 785433 ]
[ _NEW_ personal homepage http://utter.chaos.org.uk/~markt/  _NEW_        ]