1. A method for latency assignment in a system having shared resources for performing jobs, comprising: computing a new resource price at each resource; sending the new resource price to a task controller that has at least one subtask running at the resource; determining new deadlines for the subtasks in a task based on the new resource prices; and sending the new deadlines to the resources where at least one subtask in the task is running to improve system performance.