And in some cases they deserve to be in prison for the rest of their lives. But once they get to prison, I don't think there's any reasonable way of preventing them from interacting socially with other prisoners. In fact, to prevent interaction at the social level would probably create an even more violent or less-controlled prisoner.
So, number one, certain people should go to jail, and number two, they're going to have to suffer the consequences.