  We solve the dynamical GR equations for the spherically symmetric evolution
of compact stars in the vicinity of the maximum mass, for which instability
sets in according to linear perturbation theory. The calculations are done with
the analytical Zeldovich-like EOS P=a(rho-rho_0) and with the TM1
parametrisation of the RMF model. The initial configurations for the dynamical
calculations are represented by spherical stars with equilibrium density
profile, which are perturbed by either (i) an artificially added inward
velocity field proportional to the radial coordinate, or (ii) a rarefaction
corresponding to a static and expanded star. These configurations are evolved
using a one-dimensional GR hydro code for ideal and barotropic fluids.
Depending on the initial conditions we obtain either stable oscillations or the
collapse to a black hole. The minimal amplitude of the perturbation, needed to
trigger gravitational collapse is evaluated. The approximate independence of
this energy on the type of perturbation is pointed out. At the threshold we
find type I critical behaviour for all stellar models considered and discuss
the dependence of the time scaling exponent on the baryon mass and EOS.
