This is a simulation of a RTOS sheduling algorithm