Monday, 7 April 2014

Some thoughts on schedulers

Over the years we have had many people present their views on how the telescope's scheduling system isn't working fairly. It's an interesting point for discussion so here I want to share my two cents on scheduling systems and how they work.

 I should start by saying that I did not write the BRT's scheduler (Chris did) and therefore he is the expert on it not me. Nevertheless, I'd like the think that my less technical perspective might be helpful.

I start by thinking of scheduling much like a political spectrum, with left wing and right wing schedulers.

A right-wing scheduler would choose jobs based on where they are in the sky. If you just picked out currently observable jobs out of a hat of at random you would get a pretty right-wing scheduler. A job that is visible all night has a good chance of being pulled out of the hat at some point, but a job that sets 30 minutes after sunset has very little chance. A right-wing scheduler says that if you want your jobs doing quickly then pick a decent target. If your target isn't easily visible then it can be damned.

A left-wing scheduler by contrast would try and make sure that every job that is visible at least some of the night has an equal chance of being chosen. Imagine again drawing jobs from a hat but imagine that a job only visible half the night gets put into the hat twice (during the period its visible) and a job only visible 1/10th of the night gets put into the hat 10 times (for the 10th of a night its visible). That way, all jobs have an equal chance of being drawn some point that night. The average quality of the jobs might be poorer and people who went to the effort of picking a good target wouldn't see any return. (The arguments are all a lot like the political economic equivalents).

For a telescope like ours, which is supposed to be fairly simple to use for the uninitiated, the second option would seem the most appropriate and so our scheduler does indeed try to do this. For highly trained computer scientists like Chris (who wrote the scheduler), the idea of pulling random jobs out of a hat probably doesn't appeal, so a more deterministic system based on setting time is used.

The deterministic model does the jobs in order of how soon they are going to set, so that it gets the ones that are about to set out of the way first and saves the easier ones for later. The problem is that we have far more jobs in the queue than can be done in a single night so if left like this it would never ever get round to the easily observable jobs. Less take from the rich and give to the poor and more a case of take the rich away, kill them, bury them in a hole, make the poor kings. Merely unequal in the opposite direction.

For this reason there are extra parameters such as waiting time which aim to restore some balance to the overloaded system. Where this balance should lie is clearly a matter of some debate however (much like the politics...)

In my personal opinion, the telescope is still not equalizing the imbalance correctly with the result that circumpolar jobs and jobs rising shortly before sunrise are neglected unfairly but this is a system we are constantly working on improving