Yes, it is highly probable that the Pakistani government knew exactly where Osama Bin Laden was. Unfortunately, the Pakistani government also knew that a very significant share of the Pakistani population supports Bin Laden's cause, and most of the Pakistani population hates the United States.
If they betrayed him, they'd lose all legitimacy in the eyes of the people they were supposedly representing. That's why the amount of attacks on Pakistani government targets took a sharp climb and support for religious politics rose tremendously after Bin Laden was killed by a group of Americans in Pakistan.
There were a lot of people that knew his location, whether they had the official information or not doesn't matter, more than likely they knew where he was, or at least one person in the government had knowledge about his location. Of course it might have been officially just rumors, making it so that they didn't have the knowledge.
It is most likely that the Pakistani government, or at least elements within the government, were aware of Osama's location. Pakistan has always been a less than reliable ally, with some members of the government harboring loyalty to terrorist groups due to their resentment of the US. This can be seen in how we did not notify Pakistan before moving on Osama because it was possible the information would be leaked.
Yes, Pakistan knew where Osama was all along, because there is no way that he had that many people in a compound that was that big and that they did not know about it. In fact, he was found not far from a military base. The United States did not tell Pakistan we were going in, because we knew they already knew and were protecting him.
No, Pakistan did not know where Osama was all along. It is my opinion that it was in Pakistan's best interest to have Osama captured. Therefore, if they knew where he was all along they would have told the US. I believe that Pakistan did not want the US in their country, and Pakistan knew that the sooner the US found Osama the sooner the US would withdraw from their country.