If they have a hostage, you negotiate right? What are they going to do, they're already in prison...
In my country we have a special unit for that sort of thing, but also assisting in transport of detainees. I've seen them work. It goes a little like the following, I have no hands on experience with this.
-Since the subject(s) are in a prison they will be detained at some level within the onion like structure of the inverted fortress. Therefore maybe 75-80% are confined in their cell, but will not comply with the instructions given by the guards.
-The next 20% are single persons confined within their unit(most often 10 1-man cells and a common area without much movable objects.
-In the rest of the cases something happens during transport or are larger riots.
-The most common weapons are bodily fluids, sometimes common objects, rarely crafted into a weapon, but weighed down socks or sharpened anything are know to be used on rare occasion.
-Open a cell door, and rush as many units in as possible/workable with 2 or 3 riot shields to pin someone to a wall, floor or other solid structure.
-Sometimes pepper spray is used before entering, and this unit wears mostly concussive protection and special protection against bodily fluids(which may just be dirty, or in fact be contaminated with HIV or HEP B etc).
-If there are more subjects involved tear gas can be used, or tasers. The amount of unit entering will be scaled up to match the threat.
We don't have crowded jails here, a wing consists of usually 3 units with 10 cells(1 person), occupancy is around 80-90%. The last large scale riot was in the 20th century. Most prisoners are relatively content, so they want to stay in the cells when these events happen, anything you do in jail which is forbidden outside also counts on the inside, and you become a recidivist with years added to your time if you break the law. Other countries also think our sentencing is light, so you can be out within 12 years(we call that life). More common are jail times of a few months for non violent crimes, and a few years for armed robbery.
The funny thing is trying to escape or escaping is not illegal because we believe its human nature to try. committing a crime during the attempts is however forbidden. So try to keep them happy and you only need about 6-8 trained guards in total during a shift to control conflicts. and that number is based on 1 guard per 80 containees.
Over here we don't try to punish criminals by interrupting their careers anymore because feeding, housing and keeping them healthy is costly. We do it by taking their belongings via taxes. If they can't prove they bought their house, cars, watch or whatever they have they lose it, and pay taxes over them with interest