


Uniprocessor scheduling in operating systems manages how the CPU handles tasks when only one processor is available. Here are the main approaches:
### 1. **Preemptive Scheduling**:
The CPU can be taken away from a process mid-execution to allow another process to run.
- **Round Robin (RR)**: Each process gets a fixed time slice. If it doesn’t finish, it goes to the back of the queue.
- **Priority Scheduling**: CPU is assigned based on priority. A higher-priority task can interrupt a lower-priority one.
- **Shortest Remaining Time First (SRTF)**: The process with the least time left to execute runs next, preempting if needed.
### 2. **Non-Preemptive Scheduling**:
Once a process starts, it runs to completion before another process can be scheduled.
- **First-Come, First-Served (FCFS)**: Processes are scheduled in the order they arrive.
- **Shortest Job First (SJF)**: The process with the shortest duration runs first.
### 3. **Multilevel Queue Scheduling**:
Processes are divided into categories, each with its own queue and scheduling algorithm.
### 4. **Multilevel Feedback Queue**:
Processes can move between different priority queues based on their behavior, adapting to system needs.
The choice of scheduling algorithm impacts system performance, balancing fairness, CPU utilization, and response time.