For first-year students, the room allocation takes place primarily during the time of registration. The process is random.
The number of students allocated per room in the first year hostel is about 3 to 4, depending upon the administration and various relevant aspects. However, if you want to share the room with a particular person on the grounds of your batch or something that creates relevancy, it is best to go together for the counseling session. If available, you can choose a room with 2 or vacant slots.
Pressing on, for students of the second year, they are allocated a new hostel with new rooms to share. It will be permanent until the completion of your course. The number of students allocated per room is two. The major upside is that you will have the freedom to choose your roommate.