Optimal power allocation and scheduling of real-time data for cognitive radios