3,388 views
2 2 votes
Q1)
An OS contains 10 identical processes that were initiated at the same time. Each process contains 15 identical requests, and each request consumes 20msec of CPU time. A request is followed by an I/O operation that consumes 10 msec. The system consumes 2 msec in CPU scheduling. For time quantum of 20 msec , the response times of the first request of the last process is

 
A) 26 msec B) 220 msec C) 200 msec D) none

Q 2)
In the above problem , the scheduler length is
A) 3300 msec B) 3600 msec C) 6300 msec D) 6600 msec

2 Answers

Best answer
3 3 votes

Take the last process -> it will get its first request processed after 10 schedules. Because after the first time quantum, the first process does an I/O operation (as it would have finished its request which also takes 20ms and hence CPU given to next process) and hence the second process gets its chance. Thus, after 9 time quantum, the final process gets its request served (assuming a previously given process is never given CPU time again until all other processes in wait are given). So, this means we need 10 schedules (including one at the beginning) and given in question that each scheduling takes 2ms. So, response time for the first request of the last process 

$= 9\times 20 ms + 10 \times 2$

$= 180 + 20 = 200 ms$.

 

(2) The scheduling goes like this:


P1 P2 P3 ... P10 P1 P2 P3 ... P10 .... P10 P1 P2 ... P10 (P1-P10 repeated 15 times)

After every time quantum and at the beginning we need 2ms for scheduling the next process. So, total scheduling length

$= (20ms + 2ms)\times 10 \times 15$

$=220 \times 15 = 3300 ms$

 

• selected by
0 0 votes
180 + 20 + 20(10th process will respond after 20ms) = 220

I m thinking like this, please suggest!
Position:
Show:

Related questions

2 2 votes
2 2 answers
378
378 views
GO Classes asked Aug 3
378 views
Four processes arrive at time $0$ in the following order:$P_1,\ P_2,\ P_3,\ P_4$Their CPU burst times are:$P_1=8$$P_2=4$$P_3=2$$P_4=1$Calculate the difference between the...
0 0 votes
0 0 answers
288
288 views
tarunmundriya asked Dec 27, 2025
288 views
Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing a...
0 0 votes
1 1 answer
696
696 views
arpit.jha asked Apr 26, 2024
696 views
Hi, All I have a question that in Process Scheduling topic most of the time we need to solve the problem using Gantt chart that's a bit time consuming . So I wanted to kn...
0 0 votes
3 3 answers
1.1k
1.1k views
Chaitanya Kale asked Sep 22, 2022
1,083 views
If we are using non-preemptive CPU scheduling then can there be process state transition from running to ready state?