Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program that simulates the FCFS CPU scheduling policy. Assume that you have only three processes. The inputs to the program are the

Write a Java program that simulates the FCFS CPU scheduling policy. Assume that you have only three processes. The inputs to the program are the arrival time and burst time of each process. The outputs of the program are the response time, waiting time, and turnaround time for each of the three processes. The following is a sample run of the program (the underlined numbers are entered by the user who runs the program):

image text in transcribed

note: enter different numbers for the arrival and burst times to check program, run screen shot required

What is P1 arrival time? 0 What is P1 burst time? 12 What is P2 arrival time? 3 What is P2 burst time? 10 What is P3 arrival time? 5 What is P3 burst time? 5 P1 response time = 0 P1 wai (0 P1 turnaround time = 12 P2 response time = 9 P2 waiting time = 9 P2 turnaround time = 19 P3 response time = 18 P3 waiting time = 18 P3 turnaround time = 23 ting time

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions