Question 61
HardFor these processes, what is the average waiting time under FCFS?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 2 | 4 |
| P3 | 4 | 1 |
| P4 | 5 | 4 |
- A.
4.75 ms
- B.
4 ms
- C.
3 ms
- D.
8.75 ms
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
For these processes, what is the average waiting time under FCFS?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 2 | 4 |
| P3 | 4 | 1 |
| P4 | 5 | 4 |
4.75 ms
4 ms
3 ms
8.75 ms
Sign up free to see the answer and a step-by-step explanation.
For these processes, what is the average waiting time under non-preemptive SJF?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 2 | 4 |
| P3 | 4 | 1 |
| P4 | 5 | 4 |
3 ms
4.5 ms
4 ms
4.75 ms
Sign up free to see the answer and a step-by-step explanation.
For these processes, what is the average waiting time under SRTF (preemptive SJF)?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 2 | 4 |
| P3 | 4 | 1 |
| P4 | 5 | 4 |
3 ms
2 ms
4 ms
4.75 ms
Sign up free to see the answer and a step-by-step explanation.
For these processes under SRTF, when does P1 finish?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 2 | 4 |
| P3 | 4 | 1 |
| P4 | 5 | 4 |
7
15
12
16
Sign up free to see the answer and a step-by-step explanation.
With Round Robin (time quantum 2 ms), what is the average turnaround time for these processes? (A process arriving at the moment a quantum ends joins the queue before the pre-empted process.)
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 5 |
| P2 | 1 | 3 |
| P3 | 2 | 6 |
| P4 | 4 | 2 |
9 ms
7 ms
11 ms
9.75 ms
Sign up free to see the answer and a step-by-step explanation.
With Round Robin (time quantum 3 ms), which process finishes last?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 5 |
| P2 | 1 | 3 |
| P3 | 2 | 6 |
| P4 | 4 | 2 |
P4
P2
P1
P3
Sign up free to see the answer and a step-by-step explanation.
Five processes all arrive at time 0. Using non-preemptive priority scheduling (a lower number means higher priority), what is the average waiting time?
| Process | Arrival | Burst | Priority |
|---|---|---|---|
| P1 | 0 | 10 | 3 |
| P2 | 0 | 1 | 1 |
| P3 | 0 | 2 | 4 |
| P4 | 0 | 1 | 5 |
| P5 | 0 | 5 | 2 |
3.2 ms
9.6 ms
6 ms
8.2 ms
Sign up free to see the answer and a step-by-step explanation.
Under which condition does Round Robin behave exactly like FCFS?
When the time quantum is larger than every process's burst
When the quantum is 1 ms
When there are only two processes
When all processes arrive at once
Sign up free to see the answer and a step-by-step explanation.
What is the main problem with a very small Round Robin time quantum?
Processes never finish
Too much time is spent on context switches
Starvation of long jobs
It becomes FCFS
Sign up free to see the answer and a step-by-step explanation.
Which scheduling algorithm minimises the average waiting time for a given set of jobs that all arrive at once?
Shortest Job First
Round Robin
FCFS
Priority with random priorities
Sign up free to see the answer and a step-by-step explanation.