Process Priorities in Finalization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Process Priorities in Finalization

Eliot Miranda-2
Hi All,

    can anyone who understands finalization tell me if changing the priority of the finalization process can kill things.  I'm seeing the sources file get closed after a while when running my revised finalization code, and I can't see exactly why.

_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Process Priorities in Finalization

David T. Lewis
On Thu, Sep 03, 2015 at 04:37:57PM -0700, Eliot Miranda wrote:
> Hi All,
>
>     can anyone who understands finalization tell me if changing the
> priority of the finalization process can kill things.  I'm seeing the
> sources file get closed after a while when running my revised finalization
> code, and I can't see exactly why.
>
> _,,,^..^,,,_
> best, Eliot

I won't pretend to be a person who understands finalization, but one way
or another I am quite sure that the answer to your first question is going
to be yes.

The finalizer runs at UserInterruptPriority, which is between UserSchedulingPriority
and LowIOPriority. On the face of it this seems to make good sense. What
are you trying to change it to and why?

I have a general rule of thumb that says "raising the priority of anything
will produce the opposite of the intended effect". This is not a very
scientific priniciple, but it is usually not wrong (*).

Dave

(*) Oddly enough, this seems to be equally applicable to scheduling priorities
in the domain of project management.