Scheduling Algorithms Optimizing Throughput and Energy for Networked Systems