Question

In: Computer Science

4. Suppose that the following processes arrive for execution at the times indicated. Each process will...

4. Suppose that the following processes arrive for execution at the times indicated. Each process will run for the amount of time listed. In answering the questions, use non-preemptive scheduling, and base all decisions on the information you have at the time the decision must be made.

Process          Arrival Time           Burst Time

P1                           0.0                                    8

P2                           0.4                                   4

P3                           1.0                                    1

a. What is the average turnaround time for these processes with the FCFS scheduling algorithm?

b. What is the average turnaround time for these processes with the SJF scheduling algorithm?

c. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the

average turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future-knowledge scheduling.

Solutions

Expert Solution


kindly comment for further elaboration....please like if you find it needfull....


Related Solutions

Suppose that the following processes arrive for execution at time 0 in the order A, B,...
Suppose that the following processes arrive for execution at time 0 in the order A, B, C: process Run Time Priority A 4 1=high B 2 3=low C 3 2=medium Determine the execution order (with the time marks) of these process using the following 4 schedulings: FCFS, SJF, a non-preemptive priority, and RR (time slice = 2). What is the waiting time of each process for each of the scheduling algorithm? Which scheduling algorithm achieves the shortest average waiting time?
restaurant has 5 tables available. People arrive at times of a Poisson process with rate of...
restaurant has 5 tables available. People arrive at times of a Poisson process with rate of 6 per hour. The amount of time for a person to eat has an exponential distribution with a mean of 30 minutes. People who arrive when all 5 tables are full turn around and leave without eating at the restaurant. In the long run, what fraction of time is the restaurant full?
Suppose that people arrive at a bus stop in accordance with a Poisson process with rate...
Suppose that people arrive at a bus stop in accordance with a Poisson process with rate λ. The bus departs at time t. 1. Suppose everyone arrives will wait until the bus comes, i.e., everyone arrives during [0, t] will get on the bus. What is the probability that the bus departs with n people aboard? 2. Let X be the total amount of waiting time of all those who get on the bus at time t. Find E[X]. (Hint:...
Two processes share the variable "I". Process A increments it 10 times and process B decrements...
Two processes share the variable "I". Process A increments it 10 times and process B decrements it 25 times without using critical sections. The initial value of I is 0. The final value of I MUST be Please explain.
Assume, you are trying to execute the following jobs with execution times and their varying arrival...
Assume, you are trying to execute the following jobs with execution times and their varying arrival times are given. These jobs are run on a single processor using pre-emptive SJF algorithm. If the average waiting time of the processes is 4 millisecond, then the value of X is________. Show the equation with values that helps you to find the value of X. Process No: J1 J2 J3 J4 J5 J6 Arrival time: 0 1 2 3 4 5 Burst Time:...
Draw six Gantt charts that illustrate the execution of these processes using the following scheduling algorithms:
Draw six Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: 
Suppose the following two processes
Suppose the following two processes, foo and bar, are executed concurrently and share the semaphore variables S and R (each initialized to 1) and the integer variable x (initialized to 0).a. Can the concurrent execution of these two processes result in one or both being blocked forever? If yes, give an execution sequence in which one or both are blocked forever.b. Can the concurrent execution of these two processes result in the indefinite postponement of one of them? If yes,...
Suppose small aircraft arrive at a certain airport according to a Poisson process with rate α...
Suppose small aircraft arrive at a certain airport according to a Poisson process with rate α = 8 per hour, so that the number of arrivals during a time period of t hours is a Poisson rv with parameter μ = 8t. What is the probability that at least 7 small aircraft arrive during a 1-hour period? What is the probability that at least 11 small aircraft arrive during a 1-hour period? What is the probability that at least 23...
Suppose small aircraft arrive at a certain airport according to a Poisson process with rate α...
Suppose small aircraft arrive at a certain airport according to a Poisson process with rate α = 8 per hour, so that the number of arrivals during a time period of t hours is a Poisson rv with parameter μ = 8t. (Round your answers to three decimal places.) (a) What is the probability that exactly 8 small aircraft arrive during a 1-hour period? What is the probability that at least 8 small aircraft arrive during a 1-hour period? What...
Suppose small aircraft arrive at a certain airport according to a Poisson process with rate α...
Suppose small aircraft arrive at a certain airport according to a Poisson process with rate α = 8 per hour, so that the number of arrivals during a time period of t hours is a Poisson rv with parameter μ = 8t. (Round your answers to three decimal places.) (a) What is the probability that exactly 6 small aircraft arrive during a 1-hour period? What is the probability that at least 6 small aircraft arrive during a 1-hour period? What...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT