Dijkstra's banking algorithm in an operating system, solves the problem of
A. | deadlock avoidance |
B. | deadlock recovery |
C. | mutual exclusion |
D. | context switching |
Option: A Explanation : Click on Discuss to view users comments. |
In Round Robin CPU scheduling, as the time quantum is increased, the average turn around time
A. | increases |
B. | decreases |
C. | remains constant |
D. | varies irregularly |
Option: D Explanation : Click on Discuss to view users comments. |
Pre-emptive scheduling is the strategy of temporarily suspending a running process
A. | before the CPU time slice expires |
B. | to allow starving processes to run |
C. | when it requests I/O |
D. | none of these |
Option: A Explanation : Click on Discuss to view users comments. |
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 FCFS, the average waiting time will be
A. | 12.8 ms |
B. | 8 ms |
C. | 6 ms |
D. | none of these |
Option: A Explanation :
According to FCFS process solve are p1 p2 p3 p4 p5 so
for p1 waiting time =0 process time=10 then
for p2 waiting time = (process time of p1-arrival time of p2)=10-0=10 then
for p3 waiting time = (pr. time of (p1+p2)-arrival time of p3)=(10+5)-2=13 and
same for p4 waiting time=18-5=13
same for p5 waiting time=38-10=28
So total average waiting time=( 0+10+13+13+28)/5=12.8
So answer is 'A'.
0 + 10 + (15- 2) + (18 5) + (38- 10) divided by 5, i.e. 12.8 ms. Note : Here we will not see priority, we only see who comes first. And here both p1 andp2 came simultaneously and so we take p1 first and it gives answer which matches in option. Click on Discuss to view users comments. |
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, the average waiting time (without pre-emption) will be
A. | 16 ms |
B. | 12.8 |
C. | 6.8 ms |
D. | none of these |
Option: C Explanation : 8 + 0 + 3 + 15 + 8 divided by 5, i.e. 6.8 ms. Click on Discuss to view users comments. manoj kumar said: (5:32pm on Tuesday 22nd August 2017)
please explain the above question so that we clearly understand this .
|
Syllabus covered in this section is-
This Section covers Operating System Questions Answers .These questions can be used for the preparation of various competitive and academic exams like
Who can benefit
Various search terms used for This section are