Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  On a system using non-preemptive scheduling, ... Start Learning for Free
On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?
  • a)
    5, 12, 9, 18
  • b)
    5, 9, 12, 18
  • c)
    12, 18, 9, 5
  • d)
    9, 12, 18, 5
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
On a system using non-preemptive scheduling, processes with expected r...
Explanation:

In non-preemptive scheduling, once a process starts running, it will continue to run until it completes or blocks. Therefore, the order in which the processes are scheduled can have an impact on the wait time.

To minimize the wait time, we need to consider the expected run times of the processes. The idea is to schedule the shorter processes first, so that they complete quickly and reduce the overall wait time for the longer processes.

Order of Processes:
1. Select the process with the shortest expected run time from the ready queue.
2. Schedule the selected process to run.
3. Repeat steps 1 and 2 until all processes are scheduled.

Based on this approach, let's evaluate the given options:

a) 5, 12, 9, 18
- The process with expected run time 5 is the shortest, so we select it first.
- After the process with run time 5 completes, we have processes with run times 12, 9, and 18 remaining.
- The next shortest process is 9, so we schedule it.
- After the process with run time 9 completes, we have processes with run times 12 and 18 remaining.
- The next shortest process is 12, so we schedule it.
- Finally, we schedule the process with run time 18.
- The order is 5, 9, 12, 18.

c) 12, 18, 9, 5
- The process with expected run time 12 is the longest, so selecting it first would increase the overall wait time.
- Similarly, selecting the process with run time 18 next would also increase the wait time.
- Therefore, this order is not optimal.

d) 9, 12, 18, 5
- This order is similar to option a, but the process with run time 9 is scheduled before the process with run time 12.
- Since the process with run time 12 is shorter, it should be scheduled before the longer process with run time 9.
- Therefore, this order is not optimal.

Conclusion:
The optimal order to minimize the wait time is option b) 5, 9, 12, 18.
Free Test
Community Answer
On a system using non-preemptive scheduling, processes with expected r...
The processes should execute in SJF manner to get the lowest waiting time. So, the order should be 5, 9, 12, 18. Option (B) is correct.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer?
Question Description
On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2025 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer?.
Solutions for On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer?, a detailed solution for On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?a)5, 12, 9, 18b)5, 9, 12, 18c)12, 18, 9, 5d)9, 12, 18, 5Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev