Question

In: Computer Science

***THIS IS ALL THE INFORMATION THAT I HAVE**** ***PLEASE ANSWER ALL QUESTIONS*** ***GOOGLE SPREADSHEET COULD BE...

***THIS IS ALL THE INFORMATION THAT I HAVE****

***PLEASE ANSWER ALL QUESTIONS***

***GOOGLE SPREADSHEET COULD BE SCREENSHOT AND UPLOADED****

Five processes, J1, J2, J3, J4 and J5. arrive in the Ready Queue in sequence, one second apart. Each job takes 1 millisecond to load into memory.

Each job will take 10, 2, 3, 1, 5 seconds to run respectively.

     Questions

A. Create a Google Sheet where each column represents a Job and reach row represents a second..

B. Show the state of the Ready Queue in the 7th second, the 11th second and the 20th second using the First Come, First Served, Shortest Job Next, Shortest Remaining Time First, and Round Robin with time quantum of 2 seconds.

C. Which one is most efficient? Discuss advantage and disadvantage. Double spaced, one page.

Solutions

Expert Solution

Given 5 processes J1, J2, J3, J4, J5.

Assume time starts from 1s. Each job takes 1 second to load into the memory. So-

J1 will be loaded into memory at 2s, J2 at 3s,J3 at 4s, J4 at 5s and J5 at 6s.

Consider these as arrival time.

In the ready queue, some processes are ready to be run but they are not allotted to the processor for processing. For example, while executing the J1 all other processes J2, J3, J4, and J5 are in the ready queue.

A.

The Gantt chart of each algorithm is below-

The time quantum is 2 seconds.

FCFS-

FCFS schedule processes according to their arrival time. At 2 sec 11 is in ready queue, it will get CPU and it will run for 10 sec and finishes at 12th sec.

J2 arrives at 3sec, J3 at 4sec, J4 at 5sec and J5 at 6sec. So all processes have arrived while J1 is running. Ready queue at 7th and 11th sec- [J2,J3, J4, is] At 12th sec J2rtart running and runs for 2 sec and finishes its execution. At 17a sec j4 starts running and runs till 18th sec so Ready queue at 20th sec= empty.

Shortest Job Next

At time 2sec, J1 arrives and starts execution.

At 3 sec J2 arrives and is added to waiting queue. J1 will continue its execution until finished.

J1 will finish at 12 sec , by then all the processes will be in ready queue.

At 12 sec process with smallest execution time will be chosen and it will start execution.

At 7th sec ready queue - J2, J3, J4, J5.

At 11th sec Ready queue = J2, J3, J4, J5

At 13th sec , J4 has smallest execution time of 1 sec so it will start running until finished.

At 13th sec ready queue = J2, J3, J5. choose J2 with smallest execution time.

At 15th sec ready queue = J5

At 20th sec ready queue = empty

Round Robin

C. Round robin may produce the lowest waiting time, which may be taken as best because of the waiting time.

The shortest job remaining first is also good but if the number of short processes is higher, the long process still have to wait even if we are taking the remaining shortest time.


Related Solutions

Portfolio Beta Problem THIS ALL THE INFORMATION THAT I HAVE. Please answer the following questions related...
Portfolio Beta Problem THIS ALL THE INFORMATION THAT I HAVE. Please answer the following questions related to a Portfolio of stocks consisting of the stocks of the Dow 30 (assume an equal investment in each stock - perhaps $1000 investment for each). 1.) Calculate the beta of this portfolio of stocks using the current betas for each stock as given on Yahoo Finance or CNBC.  What does this portfolio beta measure? 2.) What should the owner of this portfolio expect in...
Here is all of the information to answer questions 13, 14, 15. I have asked this...
Here is all of the information to answer questions 13, 14, 15. I have asked this already and recieved wrong answers to those questions. Thank you for your help in this matter. The following information applies to the questions displayed below.] Diego Company manufactures one product that is sold for $73 per unit in two geographic regions—the East and West regions. The following information pertains to the company’s first year of operations in which it produced 44,000 units and sold...
Please answer them all in a time crunch and I only have 2 questions left in...
Please answer them all in a time crunch and I only have 2 questions left in my subscription. 1. The Brady Company has a beta of 1.2 and just paid a $5 dividend. Dividends are expected to grow at a constant 4% per year. The risk free rate is 4% and the expected return on the market is 10%. At what price would Brady stock be fairly priced? 2. Omaha Company's capital structure is 48% equity, 37% debt, 15% preferred...
Could you please provide the answer for these questions and links that you will find information...
Could you please provide the answer for these questions and links that you will find information from it? 1- Discuss how Old Town Prague has been impacted by COVID-19. This section should include a minimum of 4 sentences 2- Classify tourists who are travel to OLD Town Prague according to Plog’s Tourist Typologies (Psychocentric, Midcentric, or Allocentric) and whether travelers would most likely be organized mass tourists, individual mass tourists, explorers, or drifters (or a combination thereof).
Please answer 3 (or all) of the 5 questions below the background information: THIS IS ALL...
Please answer 3 (or all) of the 5 questions below the background information: THIS IS ALL THE INFORMATION AVAILABLE Background: Some years back policy makers in the Kingdom of Bahrain were faced with rising inflation caused by the fall in the value of the US dollar relative to other currencies. The Kingdom’s currency unit, the Bahraini dinar (BD), is pegged to the dollar, so when the dollar goes down in value the BD goes down as well. A weaker dollar/dinar...
PLEASE answer all, I dont have any more questions left (PLEASE) One connective tissue category is...
PLEASE answer all, I dont have any more questions left (PLEASE) One connective tissue category is dense connective tissue. Tissues in this category include dense irregular connective tissue, dense regular connective tissue, and elastic connective tissue. • In comparison with areolar connective tissue – which might be considered the “connective tissue standard” – in what sense does the term “dense” apply to all three types of dense connective tissue? • What is the primary way in which dense irregular connective...
Dear All Could you please answer the below question. I would expect a long answer to...
Dear All Could you please answer the below question. I would expect a long answer to may consist of 1500 words. "It has been argued in the finance literature that a great majority of mergers lead to value destruction. Citing empirical evidence, discuss whether you agree or disagree with this statment". Thank you!
Please answer the below questions ( I need answers for all the below questions). Thank you...
Please answer the below questions ( I need answers for all the below questions). Thank you True or False Write true if the statement is true or false if the statement is false. _______ The heart consists mainly of muscle. _______ Blood pressure is highest in veins. _______ Atherosclerosis is the buildup of plaque inside arteries. _______ Platelets are blood cells that fight infections. _______ Peripheral gas exchange takes place in the lungs. _______ Food travels from the mouth to...
Please make a way to answer all the questions. I cannot separate the questions anymore because...
Please make a way to answer all the questions. I cannot separate the questions anymore because I only have 1 question left to post here on Chegg, so please be considerate. Thank youu! 21. Which of the following statements is true of treasury stock? a.It usually has a debit balance. b.It is classified as an asset on the balance sheet. c.It is considered outstanding stock. d.It allows management to vote for members of the board of directors. 22. When common...
please answer all 4 questions. i don't need a long answer. please explain them briefly and...
please answer all 4 questions. i don't need a long answer. please explain them briefly and correctly. Thank you in advance. 1. What does the term qualitative analysis mean? 2. The confirmatory reactions that identify nitrate and nitrite both produce brown NO2 gas. What criterion will you use to determine which anion produced the gas? 3. The confirmation reaction for the halides involves the addition of chlorine water. Describe how you will know which, if any, of the anions is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT