Question

Assume that you have four different processes with the following attributes: Process   Arrival time.   CPU Burst....


Assume that you have four different processes with the following attributes:

Process   Arrival time.   CPU Burst.   I/O Burst Total CPU time

A. 0 4 4 9

B 3 2 3 7

C 6 5 1 11

D 12 1 1 5

As we did in class, perform a scheduling simulation using these four processes according to the following algorithms:

1) First Come First Serve

2) Round Robin with time slice = 1

3) Round Robin with time slice = 3

4) Shortest Job (CPU Burst Time) First (no preemption, as we did in class)

5) Extra credit - Shortest Job (CPU Burst Time) First (with preemption, as we mentioned at the end of class)

For each simulation, if multiple processes would be placed into the ready queue at the same time, give highest priority to a newly arriving process, next a process completing its Blocked wait time (if two are unblocked at the same time, prefer the one that waited the longest), and lastly a process that has just finished its time slice.

Turn in the time line for each simulation (you may draw these by hand and scan them, or do them electronically). Also compute the turnaround time, queue waiting time, and response time for each process, as well as the percentage idle time for the CPU overall and the number of context switches. Indicate which scheduling scheme you think performed the best.

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

1. First Come First Serve

Process Arrival Time CPU Burst I/O Burst Total CPU Time Completion Time Turn Around Time(CT-AT) Waiting Time (TAT-BT) Response Time
A 0 4 4 9 4 4 0 0
B 3 2 3 7 6 3 1 1
C 6 5 1 11 11 5 0 0
D 12 1 1 5 13 1 0 0

Time line

Process A B C None D None
Time 0 4 6 11 12 13

Percentage ideal time = (1/13)x100% = 7.69%

Number of context switches = 4

2. Round robin with time slice 1:

Process Arrival Time CPU Burst I/O Burst Total CPU Time Completion Time Turn Around Time(CT-AT) Waiting Time (TAT-BT) Response Time
A 0 4 4 9 5 5 1 0
B 3 2 3 7 6 3 1 0
C 6 5 1 11 11 5 0 0
D 12 1 1 5 13 1 0 0

Time line

Process A B A B C None D None
Time 0 3 4 5 6 11 12 13

Percentage ideal time = (1/13)x100% = 7.69%

Number of context switches = 6

3. Round robin with time slice 3:

Process Arrival Time CPU Burst I/O Burst Total CPU Time Completion Time Turn Around Time(CT-AT) Waiting Time (TAT-BT) Response Time
A 0 4 4 9 6 6 2 0
B 3 2 3 7 5 2 0 0
C 6 5 1 11 11 5 0 0
D 12 1 1 5 13 1 0 0

Time line

Process A B A C C None D None
Time 0 3 5 6 9 11 12 13

Percentage ideal time = (1/13)x100% = 7.69%

Number of context switches = 5

4. Shortest job first :

Process Arrival Time CPU Burst I/O Burst Total CPU Time Completion Time Turn Around Time(CT-AT) Waiting Time (TAT-BT) Response Time
A 0 4 4 9 4 4 0 0
B 3 2 3 7 6 3 1 1
C 6 5 1 11 11 5 0 0
D 12 1 1 5 13 1 0 0

Time line

Process A B C None D None
Time 0 4 6 11 12 13

Percentage ideal time = (1/13)x100% = 7.69%

Number of context switches = 4

5. Shortest job first(with preemption) :

Process Arrival Time CPU Burst I/O Burst Total CPU Time Completion Time Turn Around Time(CT-AT) Waiting Time (TAT-BT) Response Time
A 0 4 4 9 4 4 0 0
B 3 2 3 7 6 3 1 1
C 6 5 1 11 11 5 0 0
D 12 1 1 5 13 1 0 0

Time line

Process A B C None D None
Time 0 4 6 11 12 13

Percentage ideal time = (1/13)x100% = 7.69%

Number of context switches = 4

Shortest Job first with preemption performs the best.

Add a comment
Know the answer?
Add Answer to:
Assume that you have four different processes with the following attributes: Process   Arrival time.   CPU Burst....
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
  • (30 points) Assume you have three processes with the following attributes running on a single CPU...

    (30 points) Assume you have three processes with the following attributes running on a single CPU (uniprocessor system): Process 1/0 Burst Total CPU Time Arrival Time CPU Burst | 05 22 12 B 7 10 C D Create three scheduling simulations for these processes using the following algorithms: a. First Come First Served (FCFS) b. Round Robin, Time Slice = 2 c. Shortest Job (CPU Burst Time) First with NO Preemption Use the simulation format we covered in class to...

  • 4. Consider a ready queue with four processes :- Process Arrival Time Burst Time (ms) P1...

    4. Consider a ready queue with four processes :- Process Arrival Time Burst Time (ms) P1 Priority P2 P3 P4 P5 For each of the following CPU scheduling algorithms, determine the turnaround and average waiting time for each of the process :- a. Shortest remaining Time First b. Shortest Job First C. Priority Scheduling (Both pre-emptive and non-preemptive) d. Round Robin (quantum is 1 ms)

  • This assignment requires you to create simulations for different scheduling algorithms commonly employed by operating systems...

    This assignment requires you to create simulations for different scheduling algorithms commonly employed by operating systems to achieve multiprogramming. All problems in this assignment assume the following: The simulations you will be creating are for a uniprocessor system (single CPU). Processes in these simulations will require CPU bursts of one or more time units followed by I/O bursts of one or more time units. For simplicity’s sake, when more than one process is executing its I/O burst at the same...

  • Assume that the three processes arrived in order: Processes                            CPU Burst Time P1  &n

    Assume that the three processes arrived in order: Processes                            CPU Burst Time P1                                           17 P2                                            6 P3                                            8 a.     Please draw the Gantt chart if FCFS scheduling is used. b.    Please calculate the average waiting time and average completion time under FCFS. You MUST show the calculation procedure. c.      Please draw the Gantt chart if Round Robin is used. d.    Please calculate the average waiting time and completion time under RR with q = 3. You MUST show the calculation...

  • Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

    Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:Processburst TimePriorityP1103P211P323P414P552For each of the scheduling algorithms, FCFS, Shortest-Job-First (SJF, non-preemptive), Priority (smaller priority number implies higher scheduling priority), and RR (quantum = 1) do the following.Draw a Gantt chart to show how these processes would be scheduled.Give the turnaround time (total time from the first arrival into ready state until CPU-burst is completed) of each process.Give the waiting time (total time spent in the Ready state) of each process.Give...

  • Given the following set of processes---with the specified length of the CPU burst, arrival time, and...

    Given the following set of processes---with the specified length of the CPU burst, arrival time, and priority---compute response time for P1-P5 with round-robin scheduling with time quantum of 10 units. Also compute average response time. Assume that a newly arriving process arrives first at time T- and a process that is preempted due to the completion of its quantum arrives at time T+ in the waiting queue. (Note: Show the Gantt chart and other working details in your worksheet.) Process...

  • Q2. Consider the following processes with arrival time and burst time. 20 Marks Process Arrival Time...

    Q2. Consider the following processes with arrival time and burst time. 20 Marks Process Arrival Time Burst Time P16 29 0.0 P21 19.0 12 P32 22.0 13 P41 30.0 25 Calculate waiting time and average waiting time Round Robin (R-R) scheduling algorithm by using the following Quantum/Time slice: a. Quantum/Time Slice = 8 b. Quantum/Time Slice = 16 Q3. Calculate the CPU Utilization and Idle time by considering 35% I/O wait and number of processes are from 1 to 5....

  • V. Round Robin and SJF comparison 6 Process Arrival Time CPU Burst Time P1 0 9...

    V. Round Robin and SJF comparison 6 Process Arrival Time CPU Burst Time P1 0 9 P2 4 4 P3 6 P4 For each of the following algorithms, draw a Gantt chart and calculate the average wait time and turn around time. 1. Round robin with quantum=1 time unit 2. Round-robin with quantum=3 time-units 3. SJF WI preemption (Shortest Remaining Time First), assume quantum=3 4. SJE Wlo preemption 5. ECES

  • Consider the following 5 processes Process Arrival Time CPU Burst Time 0 3 2 6 P2...

    Consider the following 5 processes Process Arrival Time CPU Burst Time 0 3 2 6 P2 4 4 6 5 P4 2 Ps (a) Draw a timing diagram showing when each process executes under FIFO, SJF, and SRT (b) Determine the Average Turnaround Time (ATT) for each scheduling algorithm for the 5 processes

  • Consider 5 processes whose Arrival time and CPU Burst time is as follows (Process no: Arrival...

    Consider 5 processes whose Arrival time and CPU Burst time is as follows (Process no: Arrival time: Burst time): P1:0,6 P2:4,2 P3:5,2 P4:6,5 P5:7,9 Assume that the processes are scheduled using FCFS scheduling algorithm. The average waiting and turaround time is O 3.4 and 8.2 O 3.5 and 8.0 O 3.6 and 7.1 3.9 and 9.8

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