Viharas were for the purpose of living, Chaityas were assemblies for the purpose of discussions. Further, Chaityas were with Stupas, Viharas did not have stupas.
The Pala ruler ‘Devapala’ was succeeded by Vigrahapala. Vigrahapala ruled for about 3 or 4 years after that, he abdicated his throne and began to live the life of an ascetic.