What is Scheduling and Scheduler?

What is Scheduling and Scheduler? 




Introduction to Schedule and Scheduler 

Schedule
 A schedule  is a planned sequence of tasks, events, or processes with specific times.  
 It defines ,when ? and in what order ? activities should occur to meet goals efficiently.  
Schedules are used in daily life, computing, project management, transport, and manufacturing. 
A good schedule helps avoid conflicts, reduces waiting time, and beside improves resource use as well.  
In computing, a schedule often refers to CPU time allocation for programs.  

Scheduler
A scheduler is the system or algorithm that creates and enforces that schedule.  
It decides which task gets access to resources like CPU, memory, or a machine next.  
Schedulers aim to maximize throughput, minimize waiting time, and ensure fairness.  
They operate using rules or policies, not randomly.  
Without a scheduler, multiple tasks would compete and cause chaos or delays.  

Difference Between Program and process?

Program is just a Set of Instructions 
While A process is a program in Execution

Scheduling
In computing, scheduling is the method by 
which work specified by some means is 
assigned to resources that complete the work.

Scheduler
A Scheduler is a System Software Actually part 
of Operating Used to Mange processes From 
their Creation Till End. 

Types Of Scheduler
There are 3 types of scheduler 
• Long Term Scheduler
• Middle Term Scheduler
• Short Term Scheduler

Introduction of scheduler types 
1.Long term Scheduler Fetches Process From 
Pool of Processes To Memory
2• Short Term Scheduler Fetches Process From 
memory to CPU for Execution
3• Middle Term Scheduler Swaps Out process 
during it’s execution or swaps from Memory  
to Execute it later Reduces Multiprogramming.

Process Control Block
• Process State
• Process Id
• Registers
• Memory Limits
• Registers
• Program Counter
• CPU Scheduling 
Information

Process States
• New
• Ready
• Running
• Terminate
• Waiting

Scheduling and Scheduler?

Scheduling and Scheduler?

Scheduling in Different OS’s
• Batch System
• Interactive System
• Real Time Syste

Two modes In System 
• Kernel Mode   
    Kernel Resides In Kernel Mode 
• User Mode
  User Applications Called Processes Reside 
in User mode.

Technique Used In Scheduling 
Technique Used In Scheduling

Queues Used In OS
An OS uses different queues to manage processes, devices, and resources efficiently. Think of them as waiting lines where the scheduler picks who goes next.

1. Job Queue
2. Ready Queue
3. Device I/O Queues / Wait Queues
4. Interrupt Queue
5. Multilevel / Priority Queues

Key idea:  Job Queue → Ready Queue → CPU → [Device Queue if I/O needed] → back to Ready Queue.  


Queues Used In OS


Conclusion 
Scheduling is the OS mechanism for assigning resources like CPU to tasks in a specific order, while the scheduler is the system software that implements it. It uses Long-Term, Short-Term, and Mid-Term schedulers with queues such as Job, Ready, and Device queues to manage process states. By balancing fairness, throughput, and responsiveness, scheduling ensures efficient CPU use, prevents conflicts, and keeps both batch, interactive, and real-time systems running smoothly.

No comments:

Ads

Powered by Blogger.