CPU Scheduling Algorithms

CPU Scheduling Algorithms In Operating Systems


What is CPU scheduling algorithm and why it should need in operating systems?

    • Refers to switching between processes that are being executed.
    • Basics of multi programmed operating systems
    • This Switching ensures that CPU utilisation is maximised so that computer become so productive

There are two main type of CPU scheduling

1. Preemptive CPU Scheduling

2. Non-Preemptive CPU Scheduling
Type of CPU Scheduling

1. Preemptive CPU Scheduling

    • Used when the process switches from the running state to the ready state or from waiting state to ready state
    • In preemptive scheduling, the operating system can interrupt a currently running process and move it out of the CPU to allow another process to run.
    • This interruption can occur based on priorities, time slices (quantum), or some other criteria.
        Example: Round Robin, Priority Scheduling

2. Non-Preemptive CPU Scheduling
    • In non-preemptive scheduling, once a process starts running, it cannot be interrupted and must voluntarily release the CPU. 
    • The process continues to run until it completes or enters a waiting state voluntarily (e.g., by calling an I/O operation or yielding control).
        Example :  First Come First Serve (FCFS), and Priority Scheduling





Comments

Popular posts from this blog

Reflecting my 4 year Btech journey