Professional Documents
Culture Documents
Operating System Fundamentals: Information Technology Institute
Operating System Fundamentals: Information Technology Institute
• Basic Concepts
• Scheduling Criteria
• Scheduling Algorithms
• Preemptive
• Process release the CPU before it finish execution
• Example: Modern OS: Unix, Linux, Windows7
• Non-preemptive
• Process release CPU when:
• Running Waiting
• Running Terminated
• Example: MS Windows 3.1
© Copyright Information Technology Institute - 2016 8
Dispatcher
• Considerations
• Minimize maximum response time
• Minimize the variance of response times
© Copyright Information Technology Institute - 2016 12
SCHEDULING ALGORITHMS
• Shortest-Job First
• Priority
• Round-Robin
© Copyright Information Technology Institute - 2016 14
First-Come, First-Served (FCFS)
Scheduling
• Easily implemented
• Ready queue is FIFO
• Pn ready Pn PCB is linked to tail of queue
• Process at head of ready queue CPU
• Average waiting time is long!
PCB5 PCB2 PCB8 PCB4
head Next PCB Next PCB Next PCB NULL
tail . . . .
. . . .
. . . .
© Copyright Information Technology Institute - 2016 15
Example 1
Process Burst Time
P1 24
P2 3
P3 3
• Suppose that the processes arrive in the order: P1 , P2 ,
P3 The Gantt Chart for the schedule is:
P1 P2 P3
0 24 27 30
P1 P2 P3
0 3 6 30
P4 P1 P3 P2
0 3 9 16 24
0 7 8 12 16
0 2 4 5 7 11 16