Convoy Effect

Q4. What is Convoy Effect?

Ans. As all processes wait for a one big process. This results in lower CPU and device utilization, which is called convoy effect.

Advertisements

Limitations of FCFS Scheduling Algorithm

Q3. What are the limitations of FCFS scheduling algorithm? Explain with the help of above question.

Ans. If we just change the order to P2, then P3, then P1, then

Waiting Time for P1=6

P2=0

P3=3

Average Waiting Time     

=(6+0+3)/3

=9/3

=3 milliseconds

Clearly, the average waiting time under a purely first-in first-out system is going to often be poor if one task is significantly longer than the others.

Gantt Chart:

P3 P2 P1

0                       3                         6                                                                                     30  

Gantt Chart, Turnaround Time, Waiting Time, Average Turnaround Time and Average Waiting Time

Q2. Let’s take three processes that arrive at the same time in this order:

Process     CPU Time Needed (ms)

P1               24

P2             3

P3               3

The processes are assumed to have arrived in order P1, P2 and P3, all at time 0.

Draw Gantt Chart, calculate Turnaround Time, Waiting Time, Average Turnaround Time and Average Waiting Time.

Ans.

Answer is available in the link given below:

http://worldfullofquestions.com/gantt-chart-turnaround-time-waiting-time-average-turnaround-time-and-average-waiting-time/

First Come First Served (FCFS)

Q1. Explain First Come First Served (FCFS).

Q2. Let’s take three processes that arrive at the same time in this order:

Process     CPU Time Needed (ms)

P1               24

P2               3

P3               3

The processes are assumed to have arrived in order P1, P2 and P3, all at time 0.

Draw Gantt Chart, calculate Turnaround Time, Waiting Time, Average Turnaround Time and Average Waiting Time.

Q3. What are the limitations of FCFS scheduling algorithm? Explain with the help of above question.

Q4. What is Convoy Effect?

Q5. Consider the set of process P1,P2,P3,P4 and P5 having burst time as 10,1,2,1 and 5 ms and priority 5,1,3,4 and 2. The processes are assumed to have arrived at time 0, then draw Gantt Chart and calculate average turnaround and waiting time using First Come First Serve Algorithm.

Q1. Explain First Come First Served (FCFS).

Q1. Explain First Come First Served (FCFS).

Ans. This is a Non-Preemptive scheduling algorithm. FIFO strategy assigns priority to processes in the order in which they request the processor. This process that requests the CPU first is allocated the CPU first. This is easily implement with a FIFO (First In First Out) queue for managing the tasks, as the process come in, they are put at the end of the queue. As the CPU finishes each task, it removes it from the start of the queue and heads on to the next task.

Preemptive/Non-co-operative Scheduling

Q1. Explain Preemptive/Non-co-operative Scheduling.

Ans. This scheduling algorithm, takes a process and run for a maximum of some fixed time. If it is still running at the end of time interval, it is suspended and the other process will run by scheduler.

CPU scheduling decisions may take place when process,

  1. When a process switches from running to ready state (For example, when the interrupt occurs).
  2. When a process switches from waiting to ready state (For example, at completion of input/output).