Lectures On:
Process/CPU Scheduling Algorithms in Operating Systems
��Department of �Computer Science and Engineering�www.cse.ugv.edu.bd, 874/322, C&B Road, Barisal, Bangladesh.�
University of Global Village (UGV)
Barishal, Bangladesh
Lectures By��Md. Tariqul Islam�Lecturer & Coordinator
�Mobile: +880-1842733104 �Email: tariq.ugv@gmail.com�Web: www.tariqul.ugv.edu.bd
CPU Scheduling in Operating Systems
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
What is the Need for a CPU Scheduling Algorithm?
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Terminologies Used in CPU Scheduling
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Terminologies Used in CPU Scheduling
Turn Around Time (TAT) = Completion Time – Arrival Time
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Terminologies Used in CPU Scheduling
Waiting Time = Turn Around Time – Burst Time
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Things to Take Care While Designing a CPU Scheduling Algorithm
Different CPU Scheduling algorithms have different structures and the choice of a particular algorithm depends on a variety of factors.
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Things to Take Care While Designing a CPU Scheduling Algorithm
CPU Utilization:
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Things to Take Care While Designing a CPU Scheduling Algorithm
Throughput:
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Things to Take Care While Designing a CPU Scheduling Algorithm
Turn Round Time:
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Things to Take Care While Designing a CPU Scheduling Algorithm
Waiting Time:
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Things to Take Care While Designing a CPU Scheduling Algorithm
Response Time:
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Different Types of CPU Scheduling Algorithms
There are mainly two types of scheduling methods:
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Different Types of CPU Scheduling Algorithms
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Examples of Preemptive Scheduling Algorithms
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Advantages of Preemptive Scheduling
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Disadvantages of Preemptive Scheduling
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Different Types of CPU Scheduling Algorithms
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Examples Non-Preemptive Scheduling Algorithms
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Advantages of Non-Preemptive Scheduling
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Disadvantages of Non-Preemptive Scheduling
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
Differences Between Preemptive and Non-Preemptive Scheduling
Parameter | Preemptive Scheduling | Non-Preemptive Scheduling |
Basic | In this resources(CPU Cycle) are allocated to a process for a limited time. | Once resources(CPU Cycle) are allocated to a process, the process holds it till it completes its burst time or switches to waiting state |
Interrupt | Process can be interrupted in between. | Process can not be interrupted until it terminates itself or its time is up |
Starvation | If a process having high priority frequently arrives in the ready queue, a low priority process may starve | If a process with a long burst time is running CPU, then later coming process with less CPU burst time may starve |
Overhead | It has overheads of scheduling the processes | It does not have overheads |
Response Time | Average process response time is less | Average process response time is high |
Decision making | Decisions are made by the scheduler and are based on priority and time slice allocation | Decisions are made by the process itself and the OS just follows the process's instructions |
Concurrency Overhead | More as a process might be preempted when it was accessing a shared resource. | Less as a process is never preempted. |
Examples | Examples of preemptive scheduling are Round Robin and Shortest Remaining Time First | Examples of non-preemptive scheduling are First Come First Serve and Shortest Job First |
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
CPU Scheduling Algorithms
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd
CPU Scheduling Algorithms
“Thank You”
Lectures By Md. Tariqul Islam, Lecturer & Coordinator, Dept. of CSE, UGV, Email: tariq.ugv@gmail.com, Web: www.tariqul.ugv.edu.bd