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 (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.
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?
Enter True of False1. Software documentation is a support task.2. If a compromise has...
Enter True of False1. Software documentation is a support task.2. If a compromise has to be made in development, software documentation can wait.3. You have to know beforehand what kind of public the document you are about to produce addresses.4. It is not better to express an idea in a simple way than risk an intricate, complex formulation.5. Avoid having as many fields as possible filled in the screen shots that you take, so that your readers don’t get confused...
Task 2 – Discuss the following concept in detail and find out the value of Expected...
Task 2 – Discuss the following concept in detail and find out the value of Expected Loss using appropriate model.                                                        (3+4 = 7 Marks)             Discuss the Three- Bucket Approach of Asset Classification as per IFRS 9.                                                                                                                                     (3marks)                    Alex borrowed OMR 30 million from the Bank Dhofar in the year 2018. He repaid OMR 8 million excluding interest by 2019. Since 2020 beginning he is suffering losses in his business and making irregular repayment on...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT