Priority based resource allocation