Question
Consider the below processes available in the ready queue for execution and with given burst time.
Process NoArrival TimeBurst time
P113
P224
P332
P444
a) What is the time at which all the processes get executed?
b) Find the average waiting time and average turnaround time using the non- pre-emptive SJF
scheduling algorithm

Answer


Image
Arrival time of both P1 and P3 is 1 unit of time. Thus, the processor remains idle for 1 unit of
time. Since both P1 and P3 arrive at the same time, priority will be given to the one with lesser burst
time therefore P3 gets executed first for 2 units of time.P3 is over after 3 units of time and now P1
gets executed for 3 units of time. P2 has already arrived in ready queue after 2 units of time and
the completion time for P2 is 10 units. When time is 4 units P4 arrives and gets executed for 4 units
of time. Thus, its completion time is 14 units.
a) All the processes got executed at 14 units of time.
b) Average waiting time $=\frac{2+4+0+6}{4}=3$ units
Average turnaround time $=\frac{5+8+2+10}{4}=6.25$ units

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

$A B$ is a diameter of a circle and $C$ is any point on the circle. Show that the area of $\triangle A B C$ is maximum, when it is isosceles.
Two tailors P and Q earn ₹ 150 and ₹ 200 per day respectively. P can stitch 6 shirts and 4 trousers a day, while Q can stitch 10 shirts and 4 trousers per day. How many days should each work to produce at least 60 shirts and 32 trousers at minimum labour cost?
In $A=\left(\begin{array}{ccc}2 & 3 & 10 \\ 4 & -6 & 5 \\ 6 & 9 & -20\end{array}\right)$ find $A^{-1}$. Using $A^{-1}$ solve the system of equations $\frac{2}{x}+\frac{3}{y}+\frac{10}{z}=2 ; \frac{4}{x}-\frac{6}{y}+\frac{5}{z}=5$; $\frac{6}{x}+\frac{9}{y}-\frac{20}{z}=-4$
The probability that Rohit will hit a shooting target is $\frac{2}{3}$. While preparing for an international shooting competition. Rohit aims to achieve the probability of hitting the target atleast once to be 0.99 . What is the minimum number of chances must he shoot to attain this probability?
Use product $\left[\begin{array}{ccc}1 & -1 & 2 \\ 0 & 2 & -3 \\ 3 & -2 & 4\end{array}\right]\left[\begin{array}{ccc}-2 & 0 & 1 \\ 9 & 2 & -3 \\ 6 & 1 & -2\end{array}\right]$ to solve the system of equations $x+3 z=9,-x+2 y-2 z=4$, $2 x-3 y+4 z=-3$
Suppose the growth of a population is proportional to the number present. If the population of a colony doubles in 25 days, in how many days will the population become triple ?
If p is a prime then $\varphi(p)+\tau(p)=\sigma(p)$, Using the information complete the following table:
Image
Maximise Z = 8x + 9y subject to the constraints given below:
$2 x+3 y \leq 6 ; 3 x-2 y \leq 6 ; y \leq 1 ; x, y \geq 0$
A dealer in rural area wishes to purchase a number of sewing machines. He has only ₹5760 to invest and has space for at most 20 items of storage. An electronic sewing machine cost him ₹360 and a manually operated sewing machine ₹240. He can sell an electronic sewing machine at a profit of ₹22 and a manually operated sewing machine at a profit of ₹18. Assuming that he can sell all the items that he can buy, how should he invest his money in order to maximize his profit? Make it as a LPP and solve it graphically
Gymnast Clothing manufactures expensive hockey jerseys for sale to college bookstores in runs of up to $1 5 0$. Its cost (in rupees) for a run of $x$ hockey jerseys is
$C(x)=1500+10 x+0.2 x^2,(0 \leq x \leq 150)$
(a) Gymnast Clothing sells the jerseys at ₹ 90 eac. Find the revenue function
(b) Find the profit function
(c) How many should Gymnast Clothing manufacture to make a profit ? (ROund your answer up to the nearest whole number)