Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me solve this problem using queue + linked list in java language? I have spend almost a week on this but still

Can someone help me solve this problem using queue + linked list in java language? I have spend almost a week on this but still couldn't get the program running. thank you so much in advance!

ASSESSMENT #2

The operating system in multiprogramming systems arranges the processes on the CPU to get the most out of it, a process known as CPU scheduling. The Operating System schedules processes (also known as jobs) using a variety of scheduling algorithms.

One of the scheduling methods is Shortest Job First (SJF), which simply slots jobs according to their burst time. In SJF scheduling, the process with the shortest burst time is scheduled first from the list of available processes in the ready queue.

Your task is to develop a smaller version of CPU scheduler that illustrates the execution of jobs using the SJF scheduling algorithm. You are required to choose TWO data structures, OR a combination of ONE data structure with either SORTING or SEARCHING algorithm, that are applicable to the situation described in the question. Given the following sample input and output as a guide for developing the app.

Sample Input Output

Job

Arrival Time

CPU (Burst) Time

A

1

10

B

3

1

C

6

3

D

6

1

E

9

2

image text in transcribed

The calculation for Turnaround Time (TT) and Waiting Time (WT)

Job

Arrival Time

CPU (Burst) Time

Completion Time

TT

WT

A

1

10

11

10

0

B

3

1

12

9

8

C

6

3

18

12

9

D

6

1

13

7

6

E

9

2

15

6

4

Total

44

27

Average

8.8

5.4

Time: 1 Job A is executing... Time: 10 Job A is executing... Job B is in hold for Sms... Job D is in hold for 5ms... Job E is in hold for 2ms... Job C is in hold for 5ms... Time: 2 Job A is executing... Time: 3 Job A is executing... Job B has arrived... Time: 11 Job B is executing... Job D is in hold for 6m... Job E is in hold for 3ms... Job C is in hold for 6ms... Time: 4 Job A is executing... Job B is in hold for 2ms... Time: 5 Job A is executing... Job B is in hold for 3ms... Time: 12 Job D is executing... Job E is in hold for 4ms... Job C is in hold for 7ms... Time: 6 Job A is executing... Job B is in hold for 4ms... Job C has arrived... Job D has arrived... Time: 13 Job E is executing... Job C is in hold for Sms... Time: 14 Job E is executing... Job C is in hold for 9ms... Time: 7 Job A is executing... Job B is in hold for 5m... Job D is in hold for 2ms... Job C is in hold for 2ms... Time: 15 Job C is executing... Time: 16 Job C is executing... Time: 8 Job A is executing... Job B is in hold for 6ms... Job D is in hold for 3ms... Job Cis in hold for 3ms... Time: 17 Job C is executing... Time: 18 End Time: 9 Job A is executing... Job B is in hold for 7ms... Job D is in hold for 4ms... Job C is in hold for 4ms... Job E has arrived... Average turn-around time: 8.8ms Average waiting time: 5.4ms

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

Step: 3

blur-text-image

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago

Question

Explain key aspects of e-learning

Answered: 1 week ago

Question

To what extent can OL ideas help this organization?

Answered: 1 week ago