Civil services examination is a common exam for two all india services and various group A & group B Services.
Service allocation depends upon -1 merit 2. Services preferences of candidates 3. Categories of candidates.
After selection process final list is first sent to ministry of external affairs. Here first IFS officers are selected on the basis of merit, preference, and category. Thereafter,list is available for ministry of personnel for selection of IAS officers. Then list is available to ministry of Home affairs for selection of IPS officers. Lastly list available to other ministries and departments and rest officials are selected.
Note: UPSC is just requirement agency and advisory body. Selection of officials is a task of government ministry and departments.