Making sure a task consumes only the resources it needs