Question

In: Computer Science

Task 2 . . . . . . . . . . . . . ....

Task 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Five batch jobs, A through E, arrive at a computer at essentially at the same time.

They have an estimated running time of 15, 9, 3, 6 and 12 minutes, respectively.

Their externally defined priorities are 6, 3, 7, 9 and 4, respectively, with a lower value

corresponding to a higher priority. For each of the following scheduling algorithms,

determine the average turnaround time (TAT). Hint: First you should determine the

schedule, second you should determine the TAT of each job, and in the last step you

should determine the average TAT. Ignore process switching overhead. In the last 3

cases assume that only one job at a time runs until it finishes and that all jobs are

completely processor bound. Explain how you arrive at your answers.

2.1       Round robin with a time quantum of 1 minute (run in order A to E)                            (1)

2.2      Priority scheduling (1)

2.3      FCFS (run in order A to E) (1)

2.4      Shortest job first (1)

Solutions

Expert Solution

Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks.

Round Robin
Process Arrival Time Burst Time TAT Waiting time (TAT-BT)
A 0 15 45 30
B 0 9 35 26
C 0 3 13 10
D 0 6 26 20
E 0 12 42 30
AVERAGE TAT = 32.2 min
Time Queue
0 A
1 B
2 C
3 D
4 E
5 A
6 B
7 C
8 D
9 E
10 A
11 B
12     -->13 C C OUT
13 D
14 E
15 A
16 B
17 D
18 E
19 A
20 B
21 D
22 E
23 A
24 B
25-->26 D D OUT
26 E
27 A
28 B
29 E
30 A
31 B
32 E
33 A
34-->35 B B OUT
35 E
36 A
37 E
38 A
39 E
40 A
41-->42 E E OUT
42 A
43 A
44-->45 A A OUT
Priority Scheduling
Process Priority Burst Time TAT Waiting time (TAT-BT)
A 6 15 36 36
B 3 9 9 9
C 7 3 39 39
D 9 6 45 45
E 4 12 21 21
QUEUE
0 --> 9 9 --> 21 21 --> 36 36-->39 39-->45 AVERAGE TAT = (36+9+39+45+21)/5 30 min
FCFS
Process Burst Time TAT Waiting time (TAT-BT)
A 15 15 0
B 9 24 15
C 3 27 24
D 6 33 27
E 12 45 33
QUEUE
0 --> 15 15 --> 24 24 --> 27 27-->33 33-->45 AVERAGE TAT = (15+24+27+33+45)/5 28.8 min
A B C D E
Process Burst Time TAT Waiting time (TAT-BT)
A 15 45 30
B 9 18 9
C 3 3 0
D 6 9 3
E 12 30 12
QUEUE
0-->3 3-->9 9 -->18 18-->30 30-->45 AVERAGE TAT = (45+18+3+9+30)/5 21 min
C D B E A

Related Solutions

// TASK #2 Add an import statement for the Scanner class // TASK #2(Alternate) // Add...
// TASK #2 Add an import statement for the Scanner class // TASK #2(Alternate) // Add an import statement for the JOptionPane class /** This program demonstrates how numeric types and operators behave in Java. */ public class NumericTypes { public static void main (String [] args) { // TASK #2 Create a Scanner object here // (not used for alternate) // Identifier declarations final int NUMBER = 2 ; // Number of scores final int SCORE1 = 100; //...
Task 2 (P1.2) For this task you are required to summarize the use of microcontrollers in...
Task 2 (P1.2) For this task you are required to summarize the use of microcontrollers in each of the following applications. Indicate the general purpose and the main advantage of using a microcontroller. Arcade games Mechanical dolls (for example, Tickle Me Elmo) Toy drones Each of these must be at least one written paragraph. You are required to cite your sources.
Question: Not sure how to proceed with question below: In this task, task 2(a) will be...
Question: Not sure how to proceed with question below: In this task, task 2(a) will be extended so that an array of five Person objects are created. Write the comma separated values format of each object in separate lines in a file named persons.txt. Make use of the toString() method of Person to obtain comma separated values. Create a hyperlink pointing to the file persons.txt and include it on the task page. When the user clicks on the link, the...
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided...
SQL DATABASE Task 2 [10.5 marks] using the AdditionCollege database For task 2, we have provided you with the creation script for the AdditionCollege database. Run this script in MySQL Workbench to create the database. You should execute your query solutions to extract the necessary information. The script is based on the following schematic: Unit (Unit_code, Staff_id, [UnitName]) Staff (Staff_id, StaffName, Position, Gender) Taught_by (Unit_code, Staff_id, weekday) Student (Student_id, Student_name, Address, Gender) TuteGroup (TuteGroup_code, Unit_code, DayHrCode, Room_Nr) TuteGroup_List (TuteGroup_code, Student_id)...
JAVA write a code for Task 1 and Task 2 and pass the test cases. Imagine...
JAVA write a code for Task 1 and Task 2 and pass the test cases. Imagine you have a rotary combination lock with many dials. Each dial has the digits 0 - 9. At any point in time, one digit from each dial is visible. Each dial can be rotated up or down. For some dial, if a 4 is currently visible then rotating the dial up would make 5 visible; rotating the dial down would make 3 visible. When...
ORACLE TASK 2-2 USING A FOR LOOP Create a PL/SQL block using a FOR loop to...
ORACLE TASK 2-2 USING A FOR LOOP Create a PL/SQL block using a FOR loop to generate a payment schedule for a donor’s pledge, which is to be paid monthly in equal increments. Values variable for the block are starting payment due date, monthly payment amount and number of total monthly payments for the pledge. The list that’s generated should display a line for each monthly payment showing payment number, date due, payment amount, and donation balance (remaining amount of...
Activity 2 TASK A: Think of a fast food outlet or corporation that is operating in...
Activity 2 TASK A: Think of a fast food outlet or corporation that is operating in your country, but is also known world wide. From your personal experience or otherwise, compare the similarities and differences in the company; (for example, in the products and services it offers; in the dress code; its operations, etc.) TASK B: Describe the concept of cultural 'particularism'. Explain its influence in a shared global culture when transacting business
Which of these 2 styles is more likely to focus on Task Oriented Leadership, and on...
Which of these 2 styles is more likely to focus on Task Oriented Leadership, and on micromanagement (detailed supervision by the leader) of employee activities? Which style is more likely to emphasize the delegation of task scheduling, design, and approaches to completing projects to the employees?
Which of the following is NOT a task? 1) Calculate settlement amount 2) Determine if customer...
Which of the following is NOT a task? 1) Calculate settlement amount 2) Determine if customer is liable for damage 3) Insurance policy does not cover the damage 4) Check insurance policy details
1. What is a task? What is an event? What is a milestone? 2. What specific...
1. What is a task? What is an event? What is a milestone? 2. What specific information do you need to create a work breakdown structure? 3. Explain the differences between a Gantt chart and a PERT/CPM chart. 4. Why is the critical path important? Why would a task be on the critical path? 5. Why is it important to deliver effective project reports and communications?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT