Question

1 - [30 pts] Scheduling Algorithms Comparison Assume that we have 5 independent and aperiodic tasks (T1, ... , Ts) and they a

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

i) FCFS

T1 T2 T3 T4 T5

0--------------------8--------------------12-------------------13---------------------15------------------17

ii) SJF

T1 T3 T4 T5 T2

0--------------------8--------------------9-------------------11---------------------13---------------------17

iii)SRTF

T1 T2 T3 T4 T5 T2 T1

0------------- 1---------------2---------------3---------------5--------------7---------------10------------17

iv) Premptive Priority

T1 T3 T5 T2 T4

0--------------------8--------------------9-------------------11---------------------15---------------------17

b)Turnaround time

FCFS

T1 = 8-0 = 8

T2 = 12-1 = 11

T3 = 13-2 = 11

T4 = 15-3 = 12

T5 = 17-4 = 13

SJF

T1 = 8-0 = 8

T2 = 17-1 = 16

T3 = 9-2 = 7

T4 = 11-3 = 8

T5 = 13-4 = 9

SRTF

T1 = 17-0 = 17

T2 = 10-1 = 9

T3 = 3-2 = 1

T4 = 5-3 = 2

T5 = 7-4 = 3

Premptive Priority

T1 = 8-0 = 8

T2 = 15-1 = 14

T3 = 9-2 = 7

T4 = 17-3 = 14

T5 = 11-4 = 7

c) Waiting Time

FCFS

T1 = 0-0 = 0

T2 = 8-1 = 7

T3 = 12-2 = 10

T4 = 13-3 = 10

T5 = 15-4 = 11

SJF

T1 = 0-0 = 0

T2 = 13-1 = 12

T3 = 8-2 = 6

T4 = 9-3 = 6

T5 = 11-4 = 7

SRTF

T1 = 10-0 = 10

T2 = 7-1 = 6

T3 = 2-2 = 0

T4 = 3-3 = 0

T5 = 5-4 = 1

Premptive Priority

T1 = 0-0 = 0

T2 = 11-1 = 10

T3 = 8-2 = 6

T4 = 15-3 = 12

T5 = 9-4 = 5

d)

SRTF has the lowest average time. Yes, it is theoretically true.

Do ask if any doubt. Please up-vote.

Add a comment
Know the answer?
Add Answer to:
1 - [30 pts] Scheduling Algorithms Comparison Assume that we have 5 independent and aperiodic tasks...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Cpu scheduling

    Consider the following set of processes, with the length of the CPU burst times given in milliseconds:a. Draw four Gantt charts illustrating the execution of the processes using FCFS, Preemptive SJF, a non-preemptive priority, and a RR (quantum=2) scheduling. (30 pts)Note: for the RR consider that the arriving time is 0 for all processesb. What is the average waiting time of each process for of the above scheduling algorithms? (10 pts)P1 8 2 0 P2 5 36P3 1 1 8...

  • QUESTION 3 Consider the following set of processes: Priority Process Arrival Time A 0 B 1...

    QUESTION 3 Consider the following set of processes: Priority Process Arrival Time A 0 B 1 C 6 * Lower number means higher priority Burst Time (ms) 5 3 4 Draw in a paper sheet 4 Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, Non-Preemptive SJF, Shortest-Remaining-Time-First (SRTF), Non-Preemptive Priority (NPP), and RR (quantum time = 2) scheduling algorithms, then fill the following tabic accordingly. (Note: If a new process arrives at the...

  • C language show all work 1. [50 pts] Given the following set of processes, with arrival...

    C language show all work 1. [50 pts] Given the following set of processes, with arrival times, priorities, and the length of the CPU burst in ms: Priority Arrival Time Burst time Process P1 P2 P3 P4 4. 3 2 0 0 10 (Note: lower number means higher priority, processes P1, P2, P3, and P4 arrive at the same time, in the given order). a. Draw a Gantt chart showing a FCFS scheduling algorithm. b. Draw a Gantt chart showing...

  • Please answer the following question in C++ language Consider the following set of processes, with the...

    Please answer the following question in C++ language Consider the following set of processes, with the length of the CPU burst time given in milliseconds: Process            Burst Time      Priority P1. 7 5 P2 2 4 P3 11 3 P4 9 1 P5 5 3 The processes are assumed to have arrived in the order P1,P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive...

  • Question E (8 points): 1. Construct an EDF schedule with HVDF scheduling policy for the following...

    Question E (8 points): 1. Construct an EDF schedule with HVDF scheduling policy for the following tasks. What is the total value obtained? Ti-(cipi): T (6,24); T2- (4, 8); T3- (4, 8); T4- (4, 12). The values of these tasks are 2, 3, 1, and 2 respectively. Note: Schedule tasks based on deadline as the primary criteria for priority assignment (EDF); if there is a tie in priority, then choose the task with HVDF (High Value Density First) basis. 2....

  • XCOB 8 pts Question 1 The fill-in-the-blanks of this question are based on the problem data...

    XCOB 8 pts Question 1 The fill-in-the-blanks of this question are based on the problem data given below where 5 processes arrive in the order P1, P2, P3, p4 and P5, all at the time instant 0. In this problem priority increases with decreasing priority number, so the process with priority number 1 has the highest priority. Each of these blanks requires a single number to be written as answer, rounded off to one decimal place. For example, 5.3287 is...

  • IN OS: Chapter 6 CPU Scheduling • Basic Concepts • Scheduling Criteria – five criteria be...

    IN OS: Chapter 6 CPU Scheduling • Basic Concepts • Scheduling Criteria – five criteria be able to discuss and apply with evidence. • Scheduling Algorithms – FCFS, SJF (optimal), RR (be able to set and justify quantum size), SRTF, Priority - be able to apply each to a set of processes to find the sequence and calculate average wait time (we did a workshop on this). Be able to discuss related to Short Term Scheduler, medium term, long term....

  • Design Principles Canvas Ā 8 pts Question 35 Five batch jobs, A, B, C, D, and...

    Design Principles Canvas Ā 8 pts Question 35 Five batch jobs, A, B, C, D, and E, arrive at a computer system at time 0, 1, 2, 3, 4, respectively. And they have service time of 7.1. 3,5, and 4, respectively. The new jobs arrive a little ahead of the expiration of time slices. For each of the following scheduling algorithms, determine the turnaround time for each process for all jobs. Ignore process switching overhead. • Round robin with a...

  • scheduling program in C, please help 1 Objectives This programming project is to simulate a few...

    scheduling program in C, please help 1 Objectives This programming project is to simulate a few CPU scheduling policies discussed in the class. You will write a C program to implement a simulator with different scheduling algorithms. The simulator selects a task to run from ready queue based on the scheduling algorithm. Since the project intends to simulate a CPU scheduler, so it does not require any actual process creation or execution. When a task is scheduled, the simulator will...

  • Implement the following 3 CPU scheduling algorithms Simulate and evaluate each with the set of eight...

    Implement the following 3 CPU scheduling algorithms Simulate and evaluate each with the set of eight processes below. Use any programming language. The program listing should be submitted with the report. FCFS (First Come First Serve) non-preemptive (partial results provided) SJF non-preemptive MLFQ Multilevel Feedback Queue (absolute priority in higher queues)             Queue 1 uses RR scheduling with Tq = 5             Queue 2 uses RR scheduling with Tq = 10             Queue 3 uses FCFS All processes enter first...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT