Question

In: Computer Science

We will denote the last digit of your ASU ID as L (if L = 0,...

We will denote the last digit of your ASU ID as L (if L = 0, then use L = 4)

Consider three processes of the form CPU

P1:

[CPU burst of length L;  I/O burst of length 4*L; CPU burst of length L]

P2:

[CPU of  2*L; I/O of 4*L; CPU of L; I/O of 2*L; CPU of 3*L]

P3:

[CPU of  L; I/O of L; CPU of 2*L; I/O of L; CPU of L]

1.) What is the average CPU utilization for FIFO scheduling for the scenario?

2.) What is the average CPU utilization for SJF scheduling with shortest remaining CPU burst?

Solutions

Expert Solution


PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR YOU
AS I DONE MOST OF YOUR ANSWERS, THOUGH WE ARE ONLY ALLOWED TO ATTEMPT ONE ANSWER OR FOUR SUB PARTS, PLEASE GIVE IT A THUMBS UP

1.) What is the average CPU utilization for FIFO scheduling for the scenario?

In FIFO Scheduling, Processes are planned for the CPU on the standards of appearance time in the event that for any two cycle appearance time is same, at that point plan the cycle which is first in the table. 

First cycle P1 will be planned and after length L it will move out from CPU for I/O consummation and again return to prepared state on length 5L(L+4L). In this way, the fresh introduction time for measure P1 is 5L. 

Presently measure P2 will be planned and after length 2L it will move out from CPU for I/O finish and again return to prepared state on length 7L(3L+4L). Along these lines, the fresh introduction time for measure P2 is 7L. 

Presently measure P3 will be booked and after length L it will move out from CPU for I/O fruition and again return to prepared state on length 5L(4L+L). In this way, the fresh introduction time for measure P3 is 5L. 

As of now there is no cycle in the prepared state so CPU will be inert until any cycle comes in the prepared state. 

Presently, Process P1 and P3 has same appearance length at that point cycle P1 will be planned for CPU and after length L it will be ended. 

Presently measure P3 will be planned and after length 2L it will move out from CPU for I/O finish and again return to prepared state on length 9L(8L+L). Along these lines, the fresh debut time for measure P3 is 9L. 

Presently measure P2 will be booked and after length L it will move out from CPU for I/O fulfillment and again return to prepared state on length 11L(9L+2L). Thus, the fresh introduction time for measure P2 is 11L. 

Presently, Process P3 will be planned for CPU and after length L it will be ended. 

As right now there is no cycle in the prepared state so CPU will be inactive until any cycle comes in the prepared state. 

Presently, Process P2 will be planned for CPU and after length 3L it will be ended. 

Average Turn Around Time = (6L + 14L + 10L)/3 = 10L

2.) What is the average CPU utilization for SJF scheduling with shortest remaining CPU burst?

In SJF Scheduling, Processes are planned for the CPU on the standards of most brief CPU burst time on the off chance that for any two cycle CPU busrt time is same, at that point plan the cycle as per their appearance time.

First cycle P1 will be booked and after length L it will move out from CPU for I/O culmination and again return to prepared state on length 5L(L+4L). Along these lines, the fresh debut time for measure P1 is 5L.

Presently measure P3 will be planned and after length L it will move out from CPU for I/O fulfillment and again return to prepared state on length 3L(2L+L). In this way, the fresh introduction time for measure P2 is 3L.

Presently measure P2 will be planned and after length 2L it will move out from CPU for I/O culmination and again return to prepared state on length 8L(4L+4L). Thus, the fresh introduction time for measure P2 is 8L.

Presently measure P3 will be booked for length L.

Presently, Process P1 and P3 has same CPU burst time at that point cycle P1 will be planned for CPU and after length L it will be ended.

Presently measure P3 will be planned and after length L it will move out from CPU for I/O fulfillment and again return to prepared state on length 8L(7L+L). Thus, the fresh debut time for measure P3 is 8L.

Presently, Process P2 and P3 has same CPU burst time at that point cycle P2 will be planned for CPU and after length L it will move out from CPU for I/O fruition and again return to prepared state on length 11L(9L+2L). In this way, the fresh debut time for measure P2 is 11L.

Presently, Process P3 will be planned for CPU and after length L it will be ended.

As right now there is no cycle in the prepared state so CPU will be inactive until any cycle comes in the prepared state.

Presently, Process P2 will be planned for CPU and after length 3L it will be ended.

Average Turn Around Time = (6L + 14L + 10L)/3 = 10L


Related Solutions

You would like to buy 200 shares of AAA Corporation which is currently selling for $x per share (x is calculated by multiplying the last digit of your student ID number by 10, if the last digit is zero, use 100).
Question 11 You would like to buy 200 shares of AAA Corporation which is currently selling for $x per share (x is calculated by multiplying the last digit of your student ID number by 10, if the last digit is zero, use 100). The initial margin is 60% and maintenance margin is 40%. Calculate how much money you would need to provide and how much you would borrow. You sell the stock one year later after the price has increased...
Assume set of input alphabets = {a, b} If last digit = 0, 1, 2 OR...
Assume set of input alphabets = {a, b} If last digit = 0, 1, 2 OR 3 Solve the following Design and Turing Machine that Accepts only odd length palindromes and rejects all the remaining strings If last digit = 4, 5 OR 6 Solve the following Design and Turing Machine that Accepts only even length palindromes and rejects all the remaining strings If last digit = 7, 8 OR 9 Solve the following Design and Turing Machine that Accepts...
Given your registration ID as: 0 - AB - XYZV ( 0 -17-7625) If the position...
Given your registration ID as: 0 - AB - XYZV ( 0 -17-7625) If the position of a particle moving in a straight line is given as function of time by: s ( t ) = ( t − x ) ( t − y ) ( t − z ) 1- Plot the s - t curve, v - t curve and a - t curve 2- Find the average velocity and average speed through a time interval t...
An e-retailing company assigns an ID to online orders received. Order ID starts with 3-digit number,...
An e-retailing company assigns an ID to online orders received. Order ID starts with 3-digit number, followed by four letters of alphabet. a) How many unique order IDs could be generated? b) What is the probability that first order is assigned an ID where sum of 3 digits equals 4? For instance, consider order ID “123 ABCD” with sum of three digits equals 1+2+3 = 6.
We plan to develop customer’s database that stores customer’s number (ID), first name, last name and...
We plan to develop customer’s database that stores customer’s number (ID), first name, last name and balance. The program will support three operations: (a) reading and loading customer’s info from the text file, (b) entering new customer’s info, (c) looking up existing customer’s info using customer’s number(ID), (d) deleting the customer’s info and (e) the updated database will be stored in the text file after the program terminate. Customer’s database is an example of a menu-driven program. When the program...
The last digit of a credit card number is the check digit, which protects against transcription...
The last digit of a credit card number is the check digit, which protects against transcription errors such as an error in a single digit or switching two digits. The following method is used to verify actual credit card numbers but, for simplicity, we will describe it for numbers with 8 digits instead of 16: 1.) Starting from the rightmost digit, form the sum of every other digit. For example, if the credit card number is 4358 9795, then you...
Credit Card Number Check. The last digit of a credit card number is the check digit,...
Credit Card Number Check. The last digit of a credit card number is the check digit, which protects against transcription errors such as error in a single digit or switching two digits. The following method is used to verify actual credit card number but, for simplicity, we will describe it for numbers with 8 digits instead of 16: Starting from the rightmost digit, form the sum of every other digit. For example, if the credit card number is 43589795, then...
Credit Card Number Check. The last digit of a credit card number is the check digit,...
Credit Card Number Check. The last digit of a credit card number is the check digit, which protects against transcription errors such as an error in a single digit or switching two digits. The following method is used to verify actual credit card numbers but, for simplicity, we will describe it for numbers with 8 digits instead of 16: • Starting from the rightmost digit, form the sum of every other digit. For example, if the credit card number is...
Consider f(x)=2x−(1+a)f(x)=2x−(1+a), x∈(0,1+a)x∈(0,1+a) where a=9−a=9− the last digit of your student ID (i)(i) Draw a plot...
Consider f(x)=2x−(1+a)f(x)=2x−(1+a), x∈(0,1+a)x∈(0,1+a) where a=9−a=9− the last digit of your student ID (i)(i) Draw a plot of the periodic Fourier Series expansion of f(x)f(x). What is its value at x=0x=0 and why? Is it odd or even? (ii)(ii) Expand the given function in a Fourier Series.
In a lottery, each ticket has 5 one-digit numbers 0-9 on it. (with no digit repeating...
In a lottery, each ticket has 5 one-digit numbers 0-9 on it. (with no digit repeating twice) You win only if your ticket has the digits in the required order. What are your chances of winning?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT