Lab-4 Exercises: 1) Implement FCFS scheduling algorithm with different arrival time. Sample Input Enter the number of processes -- 5 Enter the Burst Time & Arrival Time of Process 0 --- 10 3 Enter the...


Lab-4 Exercises:<br>1) Implement FCFS scheduling algorithm with different arrival time.<br>Sample Input<br>Enter the number of processes -- 5<br>Enter the Burst Time & Arrival Time of Process 0 --- 10 3<br>Enter the Burst Time &Arrival Time of Process 1<br>--- 11<br>Enter the Burst Time &Arrival Time of Process 2 --- 24<br>Enter the Burst Time &Arrival Time of Process 3 --- 15<br>Enter the Burst Time &Arrival Time of Process 4 --- 5 2<br>Sample Output:<br>PROCESS<br>Arrival Time<br>BURST TIME<br>WAITING TIME<br>TURNARROUND<br>TIME<br>1<br>1<br>1<br>1<br>4<br>5<br>1<br>3<br>10<br>16<br>2<br>4<br>2<br>16<br>18<br>3<br>5<br>1<br>18<br>19<br>2) Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive<br>at times 0, 2 and 6, respectively. How many context switches are needed if the operating<br>system implements a shortest remaining time first scheduling algorithm? Do not count the<br>context switches at time zero and at the end.<br>a) 1<br>b) 2<br>c) 3<br>d) 4<br>

Extracted text: Lab-4 Exercises: 1) Implement FCFS scheduling algorithm with different arrival time. Sample Input Enter the number of processes -- 5 Enter the Burst Time & Arrival Time of Process 0 --- 10 3 Enter the Burst Time &Arrival Time of Process 1 --- 11 Enter the Burst Time &Arrival Time of Process 2 --- 24 Enter the Burst Time &Arrival Time of Process 3 --- 15 Enter the Burst Time &Arrival Time of Process 4 --- 5 2 Sample Output: PROCESS Arrival Time BURST TIME WAITING TIME TURNARROUND TIME 1 1 1 1 4 5 1 3 10 16 2 4 2 16 18 3 5 1 18 19 2) Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at times 0, 2 and 6, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end. a) 1 b) 2 c) 3 d) 4

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here