Energy-aware algorithms for tasks and bandwidth co-allocation under real-time and redundancy constraints