I watched this last night for the first time, and whilst I wasn't surprised by the nature of the people behind bars, I was taken aback by the brazenness of the drug dealings taking place, the 'paying off' of other prisoners to take the blame for infringements by the 'top dogs'. I felt embarrassed on behalf of the prison service that the balance of power is so skewed towards those at the top of the food chain behind bars. The prison staff were basically saying that they relied on the 'goodwill' of the prisoners for the system not to collapse. That goodwill seemed to be based on not coming down too hard on the their money making drug dealing. Shameful.
Policing is always by consent really. Prisons, schools, the streets, all only work if a critical mass doesn't decide to revolt.
And you stop them revolting by ensuring they have exercise, rested and trained guards, and uncrowded accomodation and all the rest that goes when staff numbers are short.