What is used for deciding priority to allocate CPU time to a process?

What is used for deciding priority to allocate CPU time to a process?

Linker
Scheduler
Loader
Debugger
This question was previously asked in
UPSC CISF-AC-EXE – 2019
The correct option is B.
In an operating system, the Scheduler (specifically, the CPU scheduler) is responsible for deciding which process among the ready processes should be allocated the CPU. Scheduling algorithms often use priority as a key factor in making this decision, giving higher priority processes preferential access to the CPU. Linkers, loaders, and debuggers are software tools involved in the development and execution lifecycle but are not primarily responsible for runtime CPU allocation priority.
The CPU scheduler implements various scheduling algorithms like First-Come, First-Served (FCFS), Shortest Job Next (SJN), Priority Scheduling, Round Robin, etc. Priority scheduling uses a priority value associated with each process to select the next process to run.