DIZNR INTERNATIONAL

Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.

Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers

https://www.gyanodhan.com/video/7B7.%20GATE%20CSEIT/Operating%20System/426.%20Day%2001%20Part%2017%28A%29-%20%20Schedulers%20in%20operating%20system%20%20%20long%20term%20short%20term%20and%20midium%20term%20schedulers.mp4

 Schedulers in Operating System (OS) – Long-Term, Short-Term & Medium-Term Schedulers

Schedulers in an Operating System (OS) are responsible for managing process execution by selecting processes to run in the CPU. There are three types of schedulers:

Long-Term Scheduler (Job Scheduler)
Short-Term Scheduler (CPU Scheduler)
Medium-Term Scheduler (Swapper)

 Long-Term Scheduler (Job Scheduler)

Function: Selects which processes should be admitted into the ready queue from the job pool.
Frequency: Runs infrequently (e.g., once every few seconds or minutes).
Main Purpose: Controls degree of multiprogramming (number of processes in memory).
Works in: Batch Systems (e.g., old mainframe systems).
Example: If there are 100 processes in the job pool, the long-term scheduler chooses 10 to bring into RAM.

Key Role: Determines which programs enter execution.

 Short-Term Scheduler (CPU Scheduler)

Function: Selects which process will execute next in the CPU from the ready queue.
Frequency: Runs very frequently (millisecond level).
Main Purpose: Decides which process gets CPU time for execution.
Works in: All systems (Batch, Time-Sharing, Real-Time).
Example: A process in the ready queue gets scheduled every few milliseconds for execution.

Key Role: Improves CPU utilization & response time.

 Medium-Term Scheduler (Swapper)

Function: Removes some processes from memory (swaps out) and brings them back later (swaps in).
Frequency: Runs occasionally, based on memory needs.
Main Purpose: Reduces memory load and improves CPU efficiency.
Works in: Time-Sharing & Virtual Memory Systems.
Example: If RAM is full, it moves an inactive process to disk (swap space) and loads an active process.

Key Role: Manages swapping of processes to optimize RAM usage.

 Comparison of Schedulers

Feature Long-Term Scheduler Short-Term Scheduler Medium-Term Scheduler
Other Name Job Scheduler CPU Scheduler Swapper
Purpose Selects which processes enter RAM Selects which process gets CPU time Manages swapping of processes
Frequency Runs infrequently Runs very frequently Runs occasionally
Speed Slowest Fastest Medium speed
Affects Multiprogramming level CPU efficiency RAM usage

 Key Points to Remember

Long-Term Scheduler → Decides which jobs enter execution
Short-Term Scheduler → Decides which job gets CPU time
Medium-Term Scheduler → Decides which jobs to swap (suspend/resume)

Would you like examples of scheduling algorithms like FCFS, Round Robin, or Priority Scheduling?

Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.

Operating System Concepts (7th Edition) 600 dpi

Here’s a simple, clear explanation of Schedulers in Operating System (Day 01 Part 17(A)) — covering Long-term, Short-term, and Medium-term Schedulers — useful for beginners, competitive exams, and CS students.


Schedulers in Operating System

Schedulers are components of the OS that manage process execution by selecting which process will run when and where.

There are 3 types:


1. Long-Term Scheduler (Job Scheduler)

Purpose:

Controls the admission of processes into the system (from job pool to ready queue).

Feature Details
Selects Which jobs to admit
Controls Degree of multiprogramming
Frequency Runs less frequently
Input Queue Job Pool → Ready Queue
Involved in Batch systems mostly

Example: Choosing 5 out of 100 stored jobs to bring into memory.


2. Short-Term Scheduler (CPU Scheduler)

Purpose:

Selects one process from the ready queue and assigns it to the CPU.

Feature Details
Selects Which process runs next
Controls CPU execution
Frequency Runs very frequently (ms level)
Input Queue Ready Queue → CPU
Works in All systems (batch, time-sharing)

Example: Picks one process to run when a running process finishes or is interrupted.


3. Medium-Term Scheduler (Swapper)

Purpose:

Temporarily removes processes from memory to reduce load (swapping), and brings them back later.

Feature Details
Selects Which process to suspend/resume
Controls Memory usage
Frequency Runs occasionally
Involved in Swapping (Suspend/Resume)
Used in Time-sharing and multitasking OS

Example: If RAM is full, it swaps a background process to disk.


Comparison Table

Scheduler Type Controls Frequency Queue Movement Key Role
Long-Term Scheduler Degree of multiprogramming Low (Infrequent) Job Pool → Ready Queue Job selection
Short-Term Scheduler CPU usage High (Frequent) Ready Queue → CPU Process execution
Medium-Term Scheduler RAM usage Medium Memory Disk (Swapping) Load balancing

Memory Tip:

“Long brings in, Short runs, Medium swaps out.”


Summary:

  • Long-Term: Decides who can enter the system.
  • Short-Term: Decides who runs on CPU next.
  • Medium-Term: Decides who stays or swaps in memory.

Would you like:

  • A diagram to visualize all 3 schedulers?
  • A PDF of notes for revision?
  • Practice questions on this topic?

Let me know!

Day 01 Part 17(A)- Schedulers in operating system long term, short term and midium term schedulers.

Types Of Scheduling