A short term scheduler written in C