CPU Scheduling in Operating
Systems
Presented by: [Your Name]
Learning Objectives
• Understand the need for CPU scheduling.
• Learn various CPU scheduling algorithms.
• Compare scheduling strategies.
• Analyze advantages and drawbacks of each.
What is CPU Scheduling?
• The OS decides which of the ready processes
should be assigned to the CPU.
• Improves CPU utilization and responsiveness.
• Essential in multiprogramming environments.
Scheduling Criteria
• CPU Utilization
• Throughput
• Turnaround Time
• Waiting Time
• Response Time
• Fairness
Scheduling Types
• Preemptive: CPU can be taken from a process.
• Non-preemptive: Process keeps CPU until it
terminates or waits.
First-Come, First-Served (FCFS)
• Non-preemptive.
• Processes are served in order of arrival.
• Drawback: Can lead to Convoy Effect.
Shortest Job First (SJF)
• Can be preemptive or non-preemptive.
• Shortest burst time first.
• Pros: Optimal in average waiting time.
• Cons: Requires knowledge of burst time.
Round Robin (RR)
• Preemptive scheduling.
• Each process gets CPU for a fixed time
quantum.
• Used in time-sharing systems.
Priority Scheduling
• Each process assigned a priority.
• CPU given to the highest priority process.
• Issue: Starvation of low-priority processes.
• Solution: Aging.
Comparison Table
Algorithm Preemptive Avg Waiting Time Use Case
FCFS No High Simple systems
SJF Yes/No Low Batch jobs
RR Yes Moderate Interactive
Priority Yes/No Varies Mixed priority
systems
Real-world Example
• Multitasking in smartphones uses Round
Robin and Priority scheduling.
• Batch systems may use FCFS or SJF.
Interactive Question
• Q: Which scheduling algorithm would you use
in a real-time system and why?
Summary
• CPU scheduling ensures efficient CPU usage.
• Different algorithms suit different
environments.
• Knowing trade-offs is key to system design.
Thank You
• Contact Info: [email / phone if applicable]

CPU_Scheduling_Presentation for semester

  • 1.
    CPU Scheduling inOperating Systems Presented by: [Your Name]
  • 2.
    Learning Objectives • Understandthe need for CPU scheduling. • Learn various CPU scheduling algorithms. • Compare scheduling strategies. • Analyze advantages and drawbacks of each.
  • 3.
    What is CPUScheduling? • The OS decides which of the ready processes should be assigned to the CPU. • Improves CPU utilization and responsiveness. • Essential in multiprogramming environments.
  • 4.
    Scheduling Criteria • CPUUtilization • Throughput • Turnaround Time • Waiting Time • Response Time • Fairness
  • 5.
    Scheduling Types • Preemptive:CPU can be taken from a process. • Non-preemptive: Process keeps CPU until it terminates or waits.
  • 6.
    First-Come, First-Served (FCFS) •Non-preemptive. • Processes are served in order of arrival. • Drawback: Can lead to Convoy Effect.
  • 7.
    Shortest Job First(SJF) • Can be preemptive or non-preemptive. • Shortest burst time first. • Pros: Optimal in average waiting time. • Cons: Requires knowledge of burst time.
  • 8.
    Round Robin (RR) •Preemptive scheduling. • Each process gets CPU for a fixed time quantum. • Used in time-sharing systems.
  • 9.
    Priority Scheduling • Eachprocess assigned a priority. • CPU given to the highest priority process. • Issue: Starvation of low-priority processes. • Solution: Aging.
  • 10.
    Comparison Table Algorithm PreemptiveAvg Waiting Time Use Case FCFS No High Simple systems SJF Yes/No Low Batch jobs RR Yes Moderate Interactive Priority Yes/No Varies Mixed priority systems
  • 11.
    Real-world Example • Multitaskingin smartphones uses Round Robin and Priority scheduling. • Batch systems may use FCFS or SJF.
  • 12.
    Interactive Question • Q:Which scheduling algorithm would you use in a real-time system and why?
  • 13.
    Summary • CPU schedulingensures efficient CPU usage. • Different algorithms suit different environments. • Knowing trade-offs is key to system design.
  • 14.
    Thank You • ContactInfo: [email / phone if applicable]