Algorithms and complexity for periodic real-time scheduling