On the maximization of the degree of stability of a linear oscillating system