Scheduling for High Throughput and Small Latency in Parallel and Distributed Systems