
- Operating System Tutorial
- OS - Home
- OS - Overview
- OS - Components
- OS - Types
- OS - Services
- OS - Properties
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling algorithms
- OS - Multi-threading
- OS - Memory Management
- OS - Virtual Memory
- OS - I/O Hardware
- OS - I/O Software
- OS - File System
- OS - Security
- OS - Linux
- OS - Exams Questions with Answers
- OS - Exams Questions with Answers
- Operating System Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
OS Process Scheduling Q & A #6
Question: Shown below is the workload for 5 jobs arriving at time zero in the order given below −
Job | Burst Time |
---|---|
1 | 10 |
2 | 29 |
3 | 3 |
4 | 7 |
4 | 12 |
Now find out which algorithm among FCFS, SJF And Round Robin with quantum 10, would give the minimum average time.
Answer: For FCFS, the jobs will be executed as:

Job | Waiting Time |
---|---|
1 | 0 |
2 | 10 |
3 | 39 |
4 | 42 |
5 | 49 |
140 |
The average waiting time is 140/5=28.
For SJF (non-preemptive), the jobs will be executed as:

Job | Waiting Time |
---|---|
1 | 10 |
2 | 32 |
3 | 0 |
4 | 3 |
5 | 20 |
65 |
The average waiting time is 65/5=13.
For Round Robin, the jobs will be executed as:

Job | Waiting Time |
---|---|
1 | 0 |
2 | 32 |
3 | 20 |
4 | 23 |
5 | 40 |
115 |
The average waiting time is 115/5=23.
Thus SJF gives the minimum average waiting time.
os_exams_questions_answers.htm
Advertisements