Question

In: Computer Science

What is the average waiting time for Processes If Operating System uses the First Come First...

What is the average waiting time for Processes If Operating System uses the First Come First Serve (FCFS) Scheduling Algorithm?

(P1=5 ms, P2=10 ms, P3=15 ms)

Process Order: P2, P1, P3

Select one:

a. 8.3

b. 11.7

c. 10

d. 6.7

Solutions

Expert Solution

a)8.3 (Option 1) is the average waiting time for Processes (Option 1 is correct )

Explanation:

First Come Frist Serve (FCFS):

  • It is a Non Preemptive Scheduling Algorithm in which process are executed by CPU or Processor based on the Arrival times. The process which Arrives Frist's get Executed Frist

(Non Preemptive means once the process started execution It will not be halted or stopped until it gets completely executed)

Calculating the Waiting time of each Process :

In cases if we are given Process Order Like A,B,C Then the Waiting time of a process is equal to the difference of the Burst times (Execution time) of all the Process before it and the Arrival time of the Process

Eg: Process Order A,B,C then Waiting time of C = Burst time of A + Burst time of B - Arrival time of C

Given P1=5 ms, P2=10 ms, P3=15 ms and the Process Order: P2, P1, P3

Note: As there is no Arrival time for any Process is given we have to consider all of them Arrived at the same time. Hence arrival times of P1,P2,P3 is 0

Waiting time of P2 = 0 (As there are no processes before P2)

Waiting time of P1 = Burst time of P2 - Arrival time of P1 = 10 - 0 = 10

Waiting time of P3 = Burst time of P2 + Burst time of P1 - Arrival time of P3 = 10 + 5 - 0 = 15

Average Waiting time of Process = (Waiting time of P2 + Waiting time of P1 +Waiting time of P3) / 3

= (0 + 10 + 15)/3

= 25/3

= 8.3

Hence 8.3 ms is the average waiting time for Processes.

Invalid Options:

b. 11.7 (Option 2) is not equivalent to 8.3 It is incorrect

c. 10 (Option 3) is not equivalent to 8.3 It is incorrect

d. 6.7 (Option 4) is not equivalent to 8.3 It is incorrect

If You Have Any Doubts. Please Ask Using Comments.

Have A Great Day!


Related Solutions

An operating system uses the First-Come, First-Served (FCFS) CPU scheduling algorithm. Consider the following set of...
An operating system uses the First-Come, First-Served (FCFS) CPU scheduling algorithm. Consider the following set of processes in this OS, with the length of the CPU burst time given in milliseconds, and the shown priority. A larger priority number implies a higher priority. There is no pre-emption. The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. Process Burst Time Priority P1 2 2 P2 1 5 P3 4 1 P4...
Operating Systems Question 1.What is the maximum number of processes in the system at any time...
Operating Systems Question 1.What is the maximum number of processes in the system at any time using the following code segment? extern char mypath[]; for ( int i = 0; i < 10; i++ ) { pid_t pid, pid_out; unsigned char status; if ( pid = fork() ) pid_out = wait ( &status ); else execl ( mypath, "child", "parameter", NULL ); } Assume that child performs some simple computation and returns the result, that is captured in status.
For First Come First Served (FCFS), -What is the arrival time, completion time, burst time, turnaround...
For First Come First Served (FCFS), -What is the arrival time, completion time, burst time, turnaround time, and the waiting time? -discuss these terms further as they pertain to the efficiency of the algorithm as well as properties such as starvation. -Pros and Cons of FCFS
Iowa Company uses a process costing system. Operating data for the first processing department for the...
Iowa Company uses a process costing system. Operating data for the first processing department for the month of June appear below: Units Percent Complete with Respect to Conversion Beginning work-in-process inventory 15,000 30% Started into production during June 75,000 Ending work-in-process inventory 20,000 70% According to the company's records, the conversion cost in beginning work-in-process inventory was $49,920 at the beginning of June. Additional conversion costs of $855,120 were incurred in the department during the month. 1. How many units...
Iowa Company uses a process costing system. Operating data for the first processing department for the...
Iowa Company uses a process costing system. Operating data for the first processing department for the month of June appear below: Units Percent Complete with Respect to Conversion Beginning work-in-process inventory 12,000 60% Started into production during June 80,000 Ending work-in-process inventory 18,000 40 % According to the company's records, the conversion cost in beginning work-in-process inventory was $44,530 at the beginning of June. Additional conversion costs of $832,150 were incurred in the department during the month. How many units...
What is the maximum number of processes in the system at any time using the following...
What is the maximum number of processes in the system at any time using the following code segment? extern char mypath[]; for ( int i = 0; i < 10; i++ ) { pid_t pid, pid_out; unsigned char status; if ( pid = fork() ) pid_out = wait ( &status ); else   execl ( mypath, "child", "parameter", NULL ); } Assume that child performs some simple computation and returns the result, that is captured in status.
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for various manufacturers of paper products. Data relating to tons of pulp processed during June are provided below:   Percent Completed Tons of Pulp Materials Labor and Overhead Work in process, June 1 82,000 82 % 24 % Work in process, June 30 51,400 42 % 16 % Started into production during June 301,900 Compute the number of tons of pulp completed and transferred out during...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for various manufacturers of paper products. Data relating to tons of pulp processed during June are provided below:   Percent Completed Tons of Pulp Materials Labor and Overhead Work in process, June 1 80,500 90 % 29 % Work in process, June 30 50,400 43 % 16 % Started into production during June 300,700 Required:   1. Compute the number of tons of pulp completed and transferred...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for various manufacturers of paper products. Data relating to tons of pulp processed during June are provided below:   Percent Completed Tons of Pulp Materials Labor and Overhead Work in process, June 1 81,700 86 % 22 % Work in process, June 30 51,200 45 % 18 % Started into production during June 301,800 Required:   1. Compute the number of tons of pulp completed and transferred...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for...
Highlands Company uses the weighted-average method in its process costing system. It processes wood pulp for various manufacturers of paper products. Data relating to tons of pulp processed during June are provided below:   Percent Completed Tons of Pulp Materials Labor and Overhead Work in process, June 1 80,000 81 % 29 % Work in process, June 30 51,100 41 % 16 % Started into production during June 300,800 Required:   1. Compute the number of tons of pulp completed and transferred...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT