Flexible resource allocation for service and production systems