To start with, what would one look for in a refuge for a zombie apocalypse? Without reference to any detailed guides, I would list the following as ground assumptions:
- Isolated from initial outbreak (so you don't find yourself in the
middle of a zombie population when you get there).
- Easy to defend.
- Self-sufficient - ready stock of food, water, weapons/ ammunition.
- Comfortable: this is what separates the refuges from the havens, and since we're looking for havens in particular...
How would a prison rate among these criteria?
Isolation: depending on the security level of the prison, this could be quite variable. Let's assume that we are talking one of those maximum-security institutions for the hard criminals (in line with OP's later assumptions). In this case, there is a good chance that the virus would not have quite penetrated either the wardens or inmates, so the prison is clean. Furthermore, if contact among wardens and inmates is kept at a minimum, there will be little chance of any errant virus spreading too quickly. 8/10.
Defensible: The high stone walls, electric fences, and watchtowers designed to keep prisoners in could be easily repurposed to keep unwanted zombies out. However, their effectiveness has to be questioned, because the main deterrent for prisoners (getting shot at) will not apply to zombies, and the zombies may find scaling those walls a lot easier than you think. Once the zombies have broken into the compound, the complicated system of iron-barred doors and gates (as I imagine it) could just as easily work against any defenders who are not completely familiar with the prison's layout. Discovering at the last second that the iron door between you and safety only opens ONE way would be comically tragic way to die. 4/10.
Self-sufficient: Prisons probably have a stock of food in their kitchens, which is good because you won't be starving anytime soon. The only downside is that it's prison food. Weaponry should also not be a problem provided that one is able to break into the armories. 9/10.
Comfort: Our maximum-security prison for hardened criminals is unlikely to be the Ritz. Amenities include bed, ensuite toilet, and your laundry done at reasonable prices. Also, the inmates may not be the easiest people to get along with (as OP assumed, although I can't be too sure), so do go in with an open mind. 2/10.
Overall, the prison rates 58%, barely passing. You would probably rely on the zombies not coming across the prison as your primary means of defense; once they make any sort of attempt to breach your refuge you would not fare too well. In the meantime, you won't actually languish, but you might wish you were dead before long. Would not seek refuge again.