Resource allocation in systems of queues