I'd differentiate between the prisoners. For example someone incarcerated for manslaughter or other negligent crimes should not be exposed to the fex humana that tends to dwell such institutes; let's face it, any of you that drive a car could cause an accident with fatal injuries. Also, you have to remember that the real punishment for some people begins after they leave prison.
So what could be done? The ones that are hopeless should be kept content to a level that they won't start prison riots, but also they won't feel that they are on a holiday in there. The rest should could be categorised and then be treated and housed according to the category they belong to. I see no reason of exposing a father of 2 children, who was convicted for causing a fatal accident, to the whims of a person from the lowest pits of whatever ghetto he came from.