Question

In: Computer Science

There are 4 processes with different arrival time and service time. Process Arrival Service A 0...

There are 4 processes with different arrival time and service time.

Process

Arrival

Service

A

0

10

B

3

4

C

5

6

D

7

2


a. Use FCFS, RR(4), SPN, SRT, and HRRN to schedule them. Calculate the waiting time and turnaround time for each process and the average turnaround time for each algorithm.

b. Compare all the 5 algorithms. Considering the overhead time for each scheduling takes 1 time unit, which is the best? If the overhead takes 4 time units, which is the best?

Solutions

Expert Solution

a)

FCFS:


TAT=51Waiting time=29

gnatt chart:

RR(4):


TAT=53

waiting time:31


SPN:


waiting time=23

TAT=45

  


SRT:


TAT=38

WT=16

  

HRRN:


TAT=49

WT=27

b)when overhead =1

according to when overhead=1

average waiting times are:

FCFS-9.75

RR(4)-11.5

SPN-8.25

SRT-7.5

HRRN-8.75

SO Least waiting time is SRT. so SRT is best.

when overhead =4

average waiting times are:

FCFS-17.25

RR(4)-25.75

SPN-15.75

SRT-11.75

HRRN-15.75

SO Least waiting time is SRT. so SRT is best.


Related Solutions

6. Consider the following set of processes P1, P2, P3, P4. Process Burst Time Arrival Time...
6. Consider the following set of processes P1, P2, P3, P4. Process Burst Time Arrival Time Priority P1 3 0 1 P2 5 1 2 P3 8 3 3 P4 4 4 2 a) Draw Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: first-come, first-served (FCFS), priority scheduling (larger number=high priority), and Round-Bobin (RR, quantum=2). b) Compute the average waiting time, turnaround time for the three algorithms. Turnaround time – amount of time to...
Consider the following processes that came at time zero with the following order of arrival with...
Consider the following processes that came at time zero with the following order of arrival with the given CPU burst time. Draw the chart for average turnaround time, average wait time, and average response time versus the time quantum 1,2,3,4,5,6 and 7 using a round-robin CPU scheduling algorithm. Processes CPU Burst Time P1 6 P2 3 P3 1 P4 7
You are given the following processes with CPU-burst time, arrival time and priority (lower # means...
You are given the following processes with CPU-burst time, arrival time and priority (lower # means higher priority) Process CPU-burst Arrival time Priority P1 12 0 5 P2 6 6 2 P3 9 1 2 P4 14 3 1 P5 7 5 4 For each of the following scheduling algorithm, show (using the diagram as in the slides), how the process are being executed. Also calculate the average wait time. Shortest job first (non-preemptive) Shortest remaining job first (preemptive) Priority-based...
1. Consider the following set of processes, with the length of CPU burst and arrival time...
1. Consider the following set of processes, with the length of CPU burst and arrival time given in milliseconds.                                                              Process            Burst time       Priority            Arrival Time             P1                         10                    3                              0 P2                          1                     1                              2 P3                          2                     4                              4 P4                          5                     2                              8 a) Draw the Gantt chart that illustrates the execution of these processes using the preemptive priority scheduling algorithm (a smaller priority number implies a higher priority). b) What...
Create a scheduler that takes unlimited processes. It will ask for number of jobs, arrival time,...
Create a scheduler that takes unlimited processes. It will ask for number of jobs, arrival time, and CPU burst time. It should use FCFS, SJF, and SRTF methods. It should also print out the gantt chart, waiting time, and turn around time for each of the processes. Please solve using Java.
2. Consider an N = 1 server queue with arrival rate λ > 0 and service...
2. Consider an N = 1 server queue with arrival rate λ > 0 and service rate µ = 1. (a) Under what conditions will the process be (i) transient, (ii) positive recurrent, and (iii) null recurrent? (b) If the process is positive recurrent, find the stationary distribution, say π(x). What is the name of this distribution? (c) If the process is transient, find ρx0 for x ≥ 1.
17#4 The wait time (after a scheduled arrival time) in minutes for a train to arrive...
17#4 The wait time (after a scheduled arrival time) in minutes for a train to arrive is Uniformly distributed over the interval [ 0 , 15 ] . You observe the wait time for the next 95 trains to arrive. Assume wait times are independent. Part a) What is the approximate probability (to 2 decimal places) that the sum of the 95 wait times you observed is between 670 and 796? Part b) What is the approximate probability (to 2...
Consider following four processes arriving in the order of P1, P2, P3 and P4. Process   Arrival...
Consider following four processes arriving in the order of P1, P2, P3 and P4. Process   Arrival Time CPU burst Time P1             0.0     6 P2    0.0                              8 P3              0.0                                7 P4              0.0                                 3 What is the average waiting time for RR scheduling (time quantum = 5)? What is the average waiting time for SJF scheduling? What is the average waiting time for FCFS scheduling?
A queuing system with a Poisson arrival rate and exponential service time has a single queue,...
A queuing system with a Poisson arrival rate and exponential service time has a single queue, two servers, an average arrival rate of 60 customers per hour, and an average service time of 1.5 minutes per customer. Answer the following questions. Show ALL formulas and calculations used in your response. The manager is thinking of implementing additional queues to avoid an overloaded system. What is the minimum number of additional queues required? Explain. How many additional servers are required to...
A queuing system with a Poisson arrival rate and exponential service time has a single queue,...
A queuing system with a Poisson arrival rate and exponential service time has a single queue, two servers, an average arrival rate of 60 customers per hour, and an average service time of 1.5 minutes per customer. The manager is thinking of implementing additional queues to avoid an overloaded system. What is the minimum number of additional queues required? Explain. How many additional servers are required to ensure the utilization is less than or equal to 50%? Explain. If the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT