Period detection for legacy real-time applications for improving the efficiency in resource scheduling