An interesting comparison of how governments handle protest movements is to look at the difference in the cases of China-Iran and Egypt-Tunisia-Libya. In the first two cases, governments cracked down and managed to quell the protests. In the latter three cases, governments cracked down, killed people, and there was a huge backlash that left the state in peril.
These states used violence and yet the result is different. Why?
The answer lies in the government's structure and army's loyalty. China and Iran have strong bureaucracies, with a loyal army taking part and backing the government. In China and Iran, there are no singular strong ruler. There are a coalition of oligarchs, united in their fear of the popular will and willingness to use force to maintain their power. In China, the Communist Party, with their commissars in the army, and generals within the party's apparatus, made a bargain and agreed to be united. In Iran, it was the Revolutionary Guard's backing of Ahmadinejad that enabled him to remain on top. Ahmadinejad was known for bending backward to fulfill the will of the Revolutionary Guard's, including its quest for a nuclear bomb.
In Tunisia, Egypt, and Libya, on the other hand, the government in each country had lost touch with both the population and the army. In Egypt, Mubarak's pursuit to have his son installed as his successor, not to mention his promotion of his son and cronies' businesses, threatened the army's interests. Even though Mubarak came from the army, his policies was no longer seen as beneficial to the military. In Tunisia, Ben Ali never had much influence on the military. Libya is harder to analyze due to limitation in data, but should the trickles of information that came in the past few days could be trusted, the army itself is deeply split, especially among tribal loyalties, and we may be seeing an impending a civil war within its ranks.
A divided army might be Qaddafi's strength, because he can be single arbiter of the different interests. It can also, however, be his Achilles heel, because a divided army based on tribal loyalties cannot completely be relied upon as a unified body to handle things when push comes to shove.
In this context, Bahrain is a very interesting case. Apparently, the order to fire on the protesters was not approved by either the King or the Crown Prince, but by the Prime Minister (the King's uncle). Still, with the army mostly Sunni and the protesters virtually Shiites, it is really a huge question mark whether the protests can truly overthrow the King, especially with the Saudis watching very carefully close by.