adaptive resource allocation