EDF scheduling to save the planet

Real time systems need to execute processes, often within a hard time limit to avoid catastrophic consequences. ‘Tasks’ or ‘jobs’ arrive at the task scheduler queue with a deadline and a worst case computation requirement and must be performed in an order which minimizes the number of missed deadlines. Put it this way, real time scheduling adheres to the ‘better never than late’ policy.

I was quite intrigued to notice the striking resemblance between real-time scheduling and existential risks. Both require foresight and offer no second chances, irreversibly overruling any chances of survival or redemption. Real time systems, fortunately, have a provably optimal algorithm to schedule tasks – it’s called the Earliest Deadline First scheduling algorithm. As the name suggests, it prioritizes tasks based solely on their deadlines and seeks to meet the earliest deadline at all times.

Building an armoury to defend against an alien attack is utterly futile if we’re more likely to be be obliterated by a large-scale nuclear war or a global pandemic before that. Likewise, focusing the spotlight entirely on avoiding global pandemics isn’t a great idea if the melting ice-caps will drown us first. We must adopt an earliest deadline first strategy rigorously and spend more than we do on cigarette ads to ensure that humanity survives this century. Of course, X-risks arrive with probabilistic deadlines and the worst case cost of avoiding them is also highly uncertain. I’m not aware of any probabilistic EDF schedulers but I plan to read about them soon and see how they can be incorporated in policy making more rigorously.