Gangs and ethnic groups often stick together and, for all their crimes, inmates do have a moral compass that regards some criminals as lesser than others - a hierarchy so well established prison systems are designed to prevent so-called jailhouse justice.
'ALL CRIMINALS HATE PAEDOPHILES'
Former Queensland Magistrates Court judge Diane Fingleton found herself on the wrong side of the law when she was convicted of intimidating a witness in 2002.
She served six months in a protection unit before her one-year conviction was quashed, and has written about what it was like living alongside some of Queensland's most vile criminals.
"Prisoners in the protection unit looked down on others. Drug addicts, drug dealers and informants looked down on child abusers. If I had looked down on them as drug dealers, I am sure they would have been outraged," she wrote in her 2010 book Nothing to do with Justice.
"There remains a pecking order in prison. Those prisoners there for the murder or sexual abuse of children are considered the lowest of the low, hence their isolation from other prisoners, for their own safety.
"I challenged the logic behind this approach with other prisoners on a couple of occasions and got no really sensible answer. All that was said was that offences against children are the worst sort of crime someone could commit, with which I agree."
It is true that no one really cares why you ended up in the clink - as long as it doesn't involve a child.
John Rynne, senior lecturer at Griffith University's School of Criminology and Social Justice, told news.com.au a man, who was convicted for sexually assaulting his stepdaughter, went to extreme lengths to hide his crime.
"Often prisoners won't tell what their offence is, whatever it is, and most prisoners don't care what it is, unless it is something against a child. But this bloke did his whole term of imprisonment in the general population even though he was in for sexual offences against a child," he said.
"That meant he didn't do any sex offender treatment programmes, because if he did, he would have been acknowledged as being a sex offender.
"He was then released on parole, but a condition of parole was that he had to do a sex offender treatment programme, and he refused to do that and he was going to be sent back [into prison].
"He ended up committing suicide because he couldn't cope with the stress of the offence mixed with the threat of having to go back to prison."
Convicted bank robber John Killick, 73, who has spent much of his adult life in maximum security prisons and is now released, told news.com.au it wasn't just paedophiles who feared attack.
"A lot of people can't go to certain jails or they'll get killed and it's a logistical nightmare really," he said.
"If the Murphys and the team [the men who murdered Anita Cobby] went into the main prison, they'd probably be killed. It's what they did that makes them a target. The crime itself.
"Having said that, there are people who have committed horrific crimes who have managed to get through in the main prison [of Goulburn jail] because it happened a long time ago when you had different crims.
"Crims didn't always turn on people over murder but they've always turned on paedophiles. Any paedophile has got to go into protection. All criminals hate paedophiles."
While paedophiles and child killers are without doubt the scum of prison society, there is another thing all inmates despise, Dr Rynne said.
"You never talk about another inmate's crime to an officer," he said. "If you're labelled a dog then that's not a good thing.
"And once they go into protection - the prisoners call it the bone yard, because that's where dogs are, and the worst thing you can be known as in prison is a dog."
LIFE IN PROTECTION
Protection units are precisely designed to prevent attacks on the most hated of inmates. It's not only for those who commit vile crimes: some other inmates just fear for their lives.
"A lot of them are in there because of drugs, gangs, they're scared of different ethnic groups and the others going to get them," Killick said.
Six of the most loathsome criminals in NSW were among the first to be housed in Long Bay Correctional Centre's Special Protection Unit when it opened in 1988 with the express purpose of stopping other inmates from killing them.
The six were Anita Cobby's killers Gary and Michael Murphy, child rapist and murderer Neville Towner, rapist Fredrick Many, child rapist Dennis Ferguson and child killer Michael George Laurence.
"They would have been killed if anyone got hold of them," former Long Bay Governor Michael Vita told the Sunday Telegraph.
"So they liked being locked in. These men knew they were disgusting and knew their place."
Some prisons, such as Queensland's Wolston Correctional Centre where Daniel Morcombe's killer Brett Peter Cowan is serving a life sentence, are protection prisons and house paedophiles, sex offenders and high-profile criminals.
There were reports this month Cowan was being moved from the protection wing to the general population of that jail. But in either case he's in protection, Dr Rynne said.
"An offender of that nature [wouldn't be] put in general run. They wouldn't last half an hour. It's just the nature of the beast," Dr Rynne said.
He said in regular jails, protection prisoners were separated from the general prison run with extreme care.
"When prisoners are being moved in the prison, say it's a big capital city prison, and it has a protection wing or area within that prison, they will lock down all the sections of the prison and move the protection prisoners for their exercise, independent of all other prisoners," he said.
"They make sure there is absolutely no contact between the protection wing and any other prisoner.
"If you happen to be walking around the prison when the protection prisoners are being moved from one area to another, you can hear the yelps and the threats and the intimidation being yelled out from the other prisoners. They're under constant threat. But they [prisoner officers] make sure they never cross. They go to extraordinary lengths to make sure they never cross.
"That could lead to the prison blowing up, and prisoner and officer safety is one of the prime things involved in prison."
But he added that anyone who put their hand up for protection was also stamped with a lifelong stigma - which sometimes extended outside of prison.
"I know drug addicts who have gone into protection because they can't repay a drug debt," he said. "[A former prisoner] could be walking around the general community outside prison and if they come across someone who was known to be a protection prisoner, they might just assume protection meant they were a child sex offender and they might get beaten up. Whereas they had nothing to do with child sex offending, they were in there because they couldn't pay a drug debt or something like that."
STRUCTURED SOCIETY BEHIND BARS
While Australian prisons aren't as hierarchical as movies might suggest, there are examples of structured societies behind bars.
Dr Rynne specialises in how Aboriginal inmates cope in jail, and said many of these inmates will maintain their kinship relationships inside jail, falling in line among elders and cousin-brothers.
He also said the experience for indigenous inmates could differ depending on their location.
"Aboriginal people from remote or isolated communities are out of country if they're in the big city prisons, so they're quiet," he said.
"They'll stand up for themselves if there's a blue but they keep to themselves and as close as they can to their family structures. But they are totally different prisoners from those who have been brought up their whole lives in the city. They understand how the prison works, they understand city-based life, they understand gangs."
Killick, who spent a total of 10 years at Goulburn jail, said prisoners are divided strongly along ethnic lines. He explained that Goulburn jail had four main wings - A, B, C and D - with a couple of yards beside each wing.
The A and B wings were protection wings and C and D were for mainstream inmates and remands.
"When people started getting killed they segregated the yards, [but before that] they used to come out in the yard and talk to whoever they wanted to," Killick said.
"You have the Aboriginals in one, then in the next yard the Lebanese, then next one caucasian Aussies and Asians, and next one caucasian Aussies and Islanders.
"They split the Aussies up because they couldn't get on even with each other. Then you got the rest of the yard for protection and one yard for remands. I went in - when I came out of segro [segregation] - the Aussie and Asian yard.
"[Even then, in each yard] you've got 50 guys in the yard with nothing to do all day. Even in the protection yard the inmates turn on each other."
Killick also said the gangs were the "heavies".
"In the old days the best fighters were the heavies," he said. "But now you've got gangs, the motorcycle gangs, the ethnic groups like the Lebanese and islanders and the Asians. They're all groups and they all stick together. And they're very hard to confront if they're in a gang."
Dr Rynne said the best way to survive was to know how to stand up for yourself. Those who couldn't were going to have a hard time.
"I've seen guys sitting on stairs absolutely shaking, physically shaking from anxiety, near the officer's stations near the wings because they're terrified of what may happen to them," he said.
"[Prisons] are hard places. But they are much, much safer than they used to be. They are very safe, the prisoners are under constant surveillance. I feel much safer walking through a prison than say Fortitude Valley [in inner city Brisbane] at night, for instance."