The parole board.
I can only tell you how my state does this definitively but I think that all the states are similar. He will serve a minimum of 3 years, which is calculated using both pre and post trial incarceration. As the 3 year mark is approaching he will go in front of the parole board and they will look at a variety of factor including- remorse, behavior in prison, prison activities (school, work, treatment etc.), institutional crowding and outside family and friend support; the parole board will then decide a parole date if he meets their criteria for release then or they will set a future parole hearing if he hasn't met the criteria yet. But unless he commits additional crime while in prison he will not serve more than 21 years because at 21 years he gets released with no post incarceration supervision.
I will add that I think that some states will allow release on parole prior to the minimum being served if the inmate meets a certain criteria which is basically the same that one has to meet for any parole hearing, it's just that my state doesn't make a regular practice of that, here a minimum is almost always observed and served.