Handout B5
Handout B5
OBJECTIVES:
• To study the basics of scheduling algorithms and learn concept of Preemptive and
Non-Preemptive scheduling.
• To understand aggregation functions.
PRE-REQUISITES:
1. Java basics.
2. Basics of Operating System.
APPARATUS:
THEORY:
A. First Come First Serve
• Jobs are executed on first come, first serve basis.
• It is a non-preemptive, pre-emptive scheduling algorithm.
• Easy to understand and implement.
• Its implementation is based on FIFO queue.
P1 5-1=4
P2 8-2=6
P3 16 - 3 = 13
P1 9 1 0
P2 2 2 2
C. Priority (Non-Preemptive)
• Priority scheduling is a non-preemptive algorithm and one of the most common
scheduling algorithms in batch systems. Each process is assigned a priority. Process
with the highest priority is to be executed first and so on.
Processes with the same priority are executed on first come first served basis. Priority
can be decided based on memory requirements, time requirements or any other resource
requirement.
P1 P2 P3
0 10 18 23
P0 (0 - 0) + (12 - 3) = 9
P1 (3 - 1) = 2
P3 (9 - 3) + (17 - 12) = 11
CONCLUSION:
QUESTIONS:
1. What is scheduling?