241 views
The arrival time, burst time and priorities of five processes are given as:

$\begin{array}{|c|c|c|c|} \hline \text{Process} & \text{Arrival Time} & \text{Burst time} & \text{Priority} \\ {} & {} & \text{(in minutes)} & {} \\ \hline P & 0 & 2 & 3 \\ \hline Q & 0 & 4 & 5 \\ \hline R & 0 & 6 & 2 \\ \hline S & 0 & 8 & 1 \text{(highest priority)} \\ \hline T & 0 & 10 & 4 \\ \hline \end{array}$

For the priority scheduling algorithm  the average response time is ________ minutes .  Ignore the context switching overhead.

### 1 comment

For calculating response time just see when the process came into system i.e it's arrival time and when CPU gave response to it i.e when it starts executing.

For ex: Process P came at t=0 but starts executing at 14. So response time is 14-0 = 14

• S       R      P        T       Q

0       8      14       16      26      30

average response time

= (0+ 8+ 14+ 16+ 26)/ 5

= 64/5

= 12.8

by

THIZ IS RT?

SOME CONSIDER TURNAROUND TIME AS RESPONSE TIME.

BUT I READ RESPONSE TIME IS A TIME WHERE PROCESS GIVE FIRST RESPONSE AFTER SUBMITTING . BUT HERE U HAVE TAKEN IT LIKE WAITING TIME .

????
response time is the time after the arrival of the process when it is scheduled to the processor for the first time. In non preemptive scheduling or when all the processes have arrival time as 0, response time will be same as waiting time because the process will run its entire burst.