Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can you please answer #5 Consider the following set of processes, with the lengt

ID: 3849333 • Letter: C

Question

can you please answer #5

Consider the following set of processes, with the length of the CPU burst time given in milliseconds. Processes may begin executing 1 ms after they arrive (i.e., a process arriving at time 5 could start executing at time 6) Any process arriving at time 0 is in the ready queue when the scheduler makes a decision about the first process to run. Determine the turnaround time for each process using each of the following scheduling algorithms: (i) first-come, first-serve (FCFS). (ii) shortest job first (SJF), (iii) shortest time to completion first (STCF), (iv) round-robin (RR) with time quantum -1 ms, and (v) a non- preemptive priority scheme in which lower numbers indicate higher priority. To break ties between processes (same burst time/priority), use first-come, first-serve ordering. a. Say the currently running process has 16 active pages, P0-P15, all of which have their reference bits set to 1. If the operating system uses the clock algorithm for page replacement, the pages are ordered numerically around the "clock (P0 is first, P1 is second, etc.), and the "clock hand" currently points to P6, which page will be replaced if a frame is needed to bring in a new page? Explain your answer for full credit. b. A portion of the currently running process's page table is shown below:

Explanation / Answer

i) FCFS

0--1--------------------11-------------------14-------------------21--------------------22----------------27

Turnaround time

P1 = 11-0 = 11 ms

P2 = 14-0 = 14 ms

P3 = 21-2 = 19 ms

P4 = 22-4 = 18 ms

P5 = 27-6 = 21 ms

ii) SJF

0--1--------------------4-------------------11-------------------12--------------------17----------------27

Turnaround time

P1 = 27-0 = 27 ms

P2 = 4-0 = 4 ms

P3 = 11-2 = 9 ms

P4 = 12-4 = 8 ms

P5 = 17-6 = 11 ms

iii) Shortest Time to Completion First(STCF)

0--1-----------------4-------------------5--------------6-----------------11----------------17---------------27

Turnaround time

P1 = 27-0 = 27 ms

P2 = 4-0 = 4 ms

P3 = 17-2 = 15 ms

P4 = 6-4 = 2 ms

P5 = 11-6 = 5 ms

iv) Round Robin(quantum = 1)

Turnaround time

P1 = 27-0 = 27 ms

P2 = 11-0 = 11 ms

P3 = 24-2 = 22 ms

P4 = 6-4 = 2 ms

P5 = 22-6 = 16 ms

v) non-preemptive priority

0--1--------------------11-------------------12-------------------19--------------------24----------------27

Turnaround time

P1 = 11-0 = 11 ms

P2 = 27-0 = 27 ms

P3 = 19-2 = 17 ms

P4 = 12-4 = 8 ms

P5 = 24-6 = 18 ms

P1 P2 P3 P4 P5
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote