Home | Trees | Indices | Help |
---|
|
Lease Preemptability policy
This is the parent class of lease preemptability policies. This type of policy is used to determine whether a lease can be preempted by another lease at a given time. However, the policy doesn't return True or False but, rather, a "preemptability score" (see get_lease_preemptability_score for more details)
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Constructor Argument slottable -- A fully constructed SlotTable
|
Computes the lease preemptability score Given a lease that needs to preempt resources (the "preemptor"), another lease (the "preemptee") that may be preempted by it, and a time, this method determines the preemptability score of the preemptee or "how preemptable is the preemptee by the preemptor at the given time". The score can be the following: -1 : Cannot be preempted under any circumstances 0.0 <= x <= 1.0: Lease can be preempted. The higher the score, the "more preemptable" it is (this is a relative measure; the score should be used to determine which of several leases is a better candidate for preemption) Arguments: preemptor -- Preemptor lease preemptee -- Preemptee lease time -- Time at which preemption would take place |
Returns an aging factor for the preemptability score This is a convenience function that can be used to "age" a preemptability score (allowing leases that have been submitted long ago to avoid preemption). The method returns a factor between 0 and 1 that can be multiplied by the score, reducing the score based on the lease's "age". Currently, this method uses a hard-coded horizon of 31 days (any lease older than 7 days cannot be preempted, and leases less than 7 days are assigned a factor proportional to their age) Arguments: lease -- Lease that is going to be preempted time -- Time at which preemption would take place |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Dec 17 10:59:21 2009 | http://epydoc.sourceforge.net |