Classical

Operating System - Process Scheduling

6:  

Consider a set of 5 processes whose arrival time. CPU time needed and the priority are given below
 

Process Priority Arrival Time (in ms) CPU Time Needed (in ms) Priority
P1 0 10 5
P2 0 5 2
P3 2 3 1
P4 5 20 4
P5 10 2 3


smaller the number, higher the priority.

If the CPU scheduling policy is SJF with pre-emption, the average waiting time will be

A.

8 ms

B.

14 ms

C.

5.6 ms

D.

none of these

 
 

Option: C

Explanation :

Scheduling order will be

P2    ,     P3    , P1     ,  P5    , P1,  P4
Waiting time of processes will be
P2 = 0
P3= 5-2=3
P1=10+2=12
P5=0
P4= 10
Average waiting time will be  = (0+3+12+0+10)/5= 23/5=4.6ms

 


7:  

Consider a set of 5 processes whose arrival time. CPU time needed and the priority are given below

Process Priority Arrival Time (in ms) CPU Time Needed (in ms) Priority
P1 0 10 5
P2 0 5 2
P3 2 3 1
P4 5 20 4
P5 10 2 3

smaller the number, higher the priority.

If the CPU scheduling policy is priority scheduling without pre-emption, the average waiting time will be

A.

12.8 ms

B.

11.8 ms

C.

10.8 ms

D.

none of these

 
 

Option: C

Explanation :

30 + 0 + 3 + 3 + 18 divided by 5, i.e. 10.8 ms.


8:  

Consider a set of 5 processes whose arrival time. CPU time needed and the priority are given below
 

Process Priority Arrival Time (in ms) CPU Time Needed (in ms) Priority
P1 0 10 5
P2 0 5 2
P3 2 3 1
P4 5 20 4
P5 10 2 3


smaller the number, higher the priority.

If the CPU scheduling policy is priority sche duling with pre-emption, the average waiting time will be

A.

19 ms

B.

7.6 ms

C.

6.8 ms

D.

none of these

 
 

Option: B

Explanation :

Here the process which will start at the initial millisecond will be P2 as it has more priority that P1.

ms          Process

0 to 2       P2 (P2 completed 2 ms here)

2 to 5        P3  (No wait for P3)

5 to 8      P2  (P2 had to wait 3 ms to get executed )

8 to 10       P4 (P4 had to wait 3 ms to get started)

10 to 12     P5 (No wait for P5)

12 to 30    P4 (P4 had to wait 2 ms to complete its remaining)

30 to 40   P1 (Was waiting for 30 ms)

So, waiting time----         P1 -30 P2 -3 P3 -0 P4 -5 P5 -0

Average----                        (30+3+0+5+0)/5= 7.6 ms

.


9:  

Cascading termination refers to termination of all child processes before the parent terminates

A.

normally

B.

abnormally

C.

normally or abnormally

D.

none of these

 
 

Option: C

Explanation :




Suggest an improvement

 


Syllabus covered in this section is-

  • Main functions of operating systems
  • Multiprogramming, multiprocessing and multitasking
  • Memory Management- Virtual memory, paging, fragmentation
  • Concurrent Processing: Mutual exclusion, Critical regions, locks and unlock.
  • Scheduling: CPU scheduling. I/O scheduling, Resource scheduling
  • Deadlock and scheduling algorithms.
  • Banker's algorithm for deadlock handling.

This Section covers Operating System Questions Answers .These questions can be used for the preparation of various competitive and academic exams like

  • UGC NET Computer Science
  • Pre PhD Entrance Exam
  • DOEACC Exams
  • Kendriya Vidyalaya Sangathan Entrance Exam
  • Undergraduate Computer Science Examinations
  • GATE Computer Science
  • Post Graduate Computer Science Test
  •  PhD Entrance Exam
  • Computer Engineering
  • State Eligibility Test (SET)
  • National Eligibility Test (NET)

Who can benefit

  • Operating System Objective Questions Answers can be used by any student who is preparing for PhD entrance exam, pre PhD entrance exam, entrance exam or any other such exam.
  • Any student who is preparing for DOEACC exams can also use Operating System questions answers for preparation of his exams.
  • Operating System mcq can be useful for the students who are pursuing any undergraduate or post graduate degree in computer science like BE, ME , Btech, Mtech, .BSc, MSc, BCA, MCA, BS, MS  or any other such degree
  • Operating System mcq with answers and explanation can also be useful for the students who are preparing for any competitive exam or recruitment exams like GATE Computer Science, UGC NET Computer Science, Kendriya Vidyalaya Sangathan PGT exam, PSU, IES or any other such exam.
  • Operating System multiple choice questions answers  can also be used by any candidate who wants to gain credits in Operating System in BS Computer science or MS Computer science,
  • You can download Operating System mcq pdf from this site.
  • You can get access to Operating System multiple choice questions answers EBook.

Various search terms used for This section are

  • Operating System Quiz Questions With Answers

  • Operating System Exam Questions Answers

  • Operating System Mcq Questions Answers

  • Operating System Mcq Pdf Download