EDF scheduler - paradigm shift

Colin Brown cbrown at met.co.nz
Thu Feb 7 14:23:02 EST 2002


The old grey matter has been busy and I have sorted out a few things:

1.    "sched" is obviously single-threaded, so the only time that sched can
see schedule changes is during the event handling period.
2.    Schedule entries made from another thread are potentially dangerous
possibly leading to data corruption.
3.    Although it may be possible to supply a timer function based on a
select (so that it can be interrupted), I suspect that the interrupted
currently active schedule entry would be actioned before its due time.
4.    Dummy "polling" schedule events could be used to periodically pick up
updated schedules.
5.    If the multi-threaded approach I outlined in my last example doesn't
fit the requirements then it is basically roll-your-own.

All that aside, I have rethought my program design and decided that an EDF
scheduler is not really necessary anyway. My mainframe background had
coloured my thinking (the mainline processing being an event handler). I
will now make the mainline simply be the scheduler and do all the real work
in my threads - a much cleaner approach.

Colin Brown
pyNZ






More information about the Python-list mailing list