Scheduling algorithms in operating systems use specific terminology and concepts to describe their operation and behavior. Here are some key terms and concepts commonly used in scheduling algorithms:
Process: A process represents a program in execution. It includes the program code, data, and a process control block (PCB) containing information about the process's state, priority, and other attributes.
Ready Queue: The ready queue is a data structure that holds processes that are ready to execute but are waiting for CPU time. Scheduling algorithms determine the order in which processes are removed from this queue and allocated CPU time.
Context Switching: Context switching refers to the process of saving the state of a running process, loading the state of another process, and switching the CPU from one process to another. Context switches are necessary when the operating system changes the currently executing process.
Burst Time: Burst time, also known as execution time, is the amount of time a process requires to complete its execution once it starts running on the CPU.
Arrival Time: Arrival time is the time at which a process enters the ready queue or becomes available for execution. It helps in scheduling processes based on when they arrive.
Completion Time: Completion time is the time at which a process finishes its execution.
Turnaround Time: Turnaround time is the total time taken by a process from its arrival in the ready queue to its completion. It includes both waiting time and execution time.
Waiting Time: Waiting time is the total time a process spends waiting in the ready queue before it is allocated CPU time.
Response Time: Response time is the time it takes for a system to respond to a user's input or request. It includes both waiting time and the initial time taken to start executing the process after it becomes ready.
Quantum (Time Slice): Quantum, also known as a time slice, is the fixed amount of time allocated to a process in a round-robin scheduling algorithm. After the quantum expires, the process is moved to the back of the queue.
Priority: Priority is a value assigned to a process that indicates its relative importance or priority level compared to other processes. Higher-priority processes are scheduled to run before lower-priority ones.
Scheduling Policy: A scheduling policy is a set of rules or algorithms that determine the order in which processes are selected from the ready queue and allocated CPU time. Examples include FIFO, SJF, RR, and priority scheduling.
Preemption: Preemption occurs when a running process is forcibly removed from the CPU before it completes its execution. Preemptive scheduling algorithms allow preemption to switch to a higher-priority process.
Starvation: Starvation is a situation where a process is unable to make progress because it is consistently bypassed by higher-priority processes. Starvation can occur in non-preemptive scheduling.
Round-Robin (RR): Round-robin is a scheduling algorithm where each process is allocated a fixed time quantum to run on the CPU in a cyclic manner.
Shortest Job Next (SJN) or Shortest Job First (SJF): SJN or SJF scheduling selects the process with the shortest burst time for execution next, aiming to minimize waiting times.
First-Come-First-Served (FCFS): FCFS scheduling allocates CPU time to processes in the order they arrive in the ready queue.
Multilevel Queue: A multilevel queue is a scheduling scheme that categorizes processes into multiple priority levels, each with its own scheduling algorithm.
Multilevel Feedback Queue: Multilevel feedback queue scheduling allows processes to change priority dynamically based on their behavior, which can include moving processes between different queues.
These terms provide a foundation for understanding the concepts and mechanisms involved in CPU scheduling algorithms in operating systems. Different scheduling algorithms use these concepts to achieve various scheduling objectives.
Last updated