Question: Programming Assignment two: Program for FCFS Scheduling. Given n processes with their burst times, the task is to find average waiting time and average turnaround

Programming Assignment two:

Program for FCFS Scheduling.

Given n processes with their burst times, the task is to find average waiting time and average turnaround time using FCFS scheduling algorithm.

First in, first out (FIFO), also known as first come, first served (FCFS), is the simplest scheduling algorithm. FIFO simply queues processes in the order that they arrive in the ready queue.

In this, the process that comes first will be executed first and next process starts only after the previous gets fully executed.

Here we are considering that arrival time for all processes is 0.

How to compute below times in Round Robin using a program?

Completion Time: Time at which process completes its execution.

Turn Around Time: Time Difference between completion time and arrival time. Turn Around Time = Completion Time Arrival Time

Waiting Time (W.T): Time Difference between turnaround time and burst time.

Waiting Time = Turn Around Time Burst Time

In this example, we have assumed arrival times as 0, so turn around and completion times are same.

Important Points:

Non-preemptive

Average Waiting Time is not optimal

Cannot utilize resources in parallel: Results in Convoy effect (Consider a situation when many IO bound processes are there and one CPU bound process. The IO bound processes have to wait for CPU bound process when CPU bound process acquires CPU. The IO bound process could have better taken CPU for some time, and then used IO devices).

Programming Assignment two: Program for FCFS Scheduling. Given n processes with their

Using the programming environment of your choice, write and submit a program, (source code and output) to fully implement the above example.

Java please

oder FCFS (Example) Process Duration P1 | 24 P2 3 P3 4 1 Arrival Time 0 0 1 0 2 3 Gantt Chart: P1(24) P2(3) P3(4) P1 waiting time: 0 P2 waiting time: 24 P3 waiting time: 27 The Average waiting time: (0+24+27)/3 = 17 oder FCFS (Example) Process Duration P1 | 24 P2 3 P3 4 1 Arrival Time 0 0 1 0 2 3 Gantt Chart: P1(24) P2(3) P3(4) P1 waiting time: 0 P2 waiting time: 24 P3 waiting time: 27 The Average waiting time: (0+24+27)/3 = 17

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!