Q. Starvation can be avoided by which of the following statements
I. By using SJF
II. By using FCFS
A. I only
B. II only
C. I and II
D. None
Answer: II only
By using FCFS, starvation can be avoided.
I. By using SJF
II. By using FCFS
A. I only
B. II only
C. I and II
D. None
Answer: II only
By using FCFS, starvation can be avoided.
Q. Which of the following statements are true?
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
A. I only
B. I and III only
C. II and III only
D. I, II and III
A. I only
B. I and III only
C. II and III only
D. I, II and III
Answer: I, II and III
A Process Scheduler schedules different processes to be assigned to the CPU based on particular scheduling algorithms. There are six popular process scheduling algorithms −
A Process Scheduler schedules different processes to be assigned to the CPU based on particular scheduling algorithms. There are six popular process scheduling algorithms −
- First-Come, First-Served (FCFS) Scheduling
- Shortest-Job-Next (SJN) Scheduling
- Priority Scheduling
- Shortest Remaining Time
- Round Robin(RR) Scheduling
- Multiple-Level Queues Scheduling
For SJF
If you want to find out shortest job first you have to use unique data structure and on each traversal, you have to find the shortest job depending on the given time slot for each task.
For FCFS
The queue data structure is used to specify the functionality of FCFS data structure. You just have to traverse each task which is in the queue.
If you want to find out shortest job first you have to use unique data structure and on each traversal, you have to find the shortest job depending on the given time slot for each task.
For FCFS
The queue data structure is used to specify the functionality of FCFS data structure. You just have to traverse each task which is in the queue.
Unlike FCFS, there is the potential for starvation in SJF. Starvation occurs when a large process never gets run to run because shorter jobs keep entering the queue.
No comments