A method, system and computer readable storage medium for executing a set
of tasks. The method includes selecting an incomplete task in the set and
then either starting its execution (if it was not previously suspended)
or resuming its execution (if it was previously suspended). An execution
timer is also started. If the selected task completes before expiry of
the execution timer, the selection process is reinitiated; otherwise, the
selected task is suspended, and the selection process is reinitiated. In
this way, processing of a lengthy or lower-priority task can be
pre-empted by processing of a shorter or higher-priority task. The method
may also involve recognizing that a new version of an existing task
already in the task set has been added thereto. In such a case, the older
version is removed from the task set even if it is not yet complete.