A framework for guaranteeing statistical QoS