On Optimal Resource Allocation in Phased Array Radar Systems