A two-level stochastic approximation for admission control and bandwidth allocation