Re: How do I kill a process that is locked to a resource

Albert Cahalan (albert@ccs.neu.edu)
Tue, 24 Dec 1996 00:00:00 -0500 (EST)


From: "Grant R. Guenther" <grant@knot.torque.net>
>
>> The button is electronic, but I don't know whether there is a
>> method to lock the disk in the drive through software.
>
> It is a standard part of the kernel, all the drivers that deal with
> removable disk media lock the media in the drive if they can.
> Only after the device has been fsync()ed is the disk unlocked.

I wish ext2 (and others) would mark the filesystem clean and flush
pages to disk when filesystem activity stops. Then supermount would
work better and a crash would leave most filesystems marked clean.

>> This should also extend to hard disks that have gone south,
>> which was the problem the original poster was experiencing.
>
> If a *device* vanishes - by being unplugged for instance - there's
> really nothing the kernel can do - it most likely has cached pages
> for that device which it cannot dispose of. This is what causes
> the deadlocks.

Cached pages may be stored in the bitbucket to save RAM.
I really mean that, because 40% of an executable is not
much good! Data is somewhat more useful, but it will be
lost anyway. It is better to recover the resources.