Skip to content

⟦REQ⟧ Add cancellation cost implementations for Job processes #5

@aarjaneiro

Description

@aarjaneiro

Is your feature request related to a problem? Please describe.
Currently parallelqueue.jobs has DefaultJob which immediately removes all clones upon the completion of any one clone's processing. Realistically, a penalty should exist to model the reality that the act of searching for and removing clones incurs a cost.

Describe the solution you'd like
Add an additional cancellation cost argument to a Job process otherwise the same as parallelqueue.jobs.DefaultJob such that

            if system.ReplicaDict is not None:
                for c in system.ReplicaDict[name]:
                    try:
                        c.interrupt()
                    except:
                        pass

is changed to have the for loop initiated following a user-specified cancellation cost distribution. Moreover, the user should be able to specify whether or not the replica which just finished and is initiating this cancellation cost itself remains in the processor while doing so (this is the trickier part - there is a risk that another replica finishes while the the cancellation cost is being incurred. Such a job should be immediately disposed of and should not itself try to remove other clones. Moreover, if the system was (for example) redundancy-2, the job which incurred the cancellation cost should now leave the system as well as there are no more replicas to remove).

As an example, one might model the cancellation cost to be such that a random draw from Exp(λ) defines how long the job which just finished would need to wait before cancelling the others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions