# CS 3502 - Operating Systems

CS 3502 - Operating Systems

Assignment #2

We have just 3 processes, P1, P2 and P3, and they arrive at 1, 15 and 23 milliseconds respectively, and they each have two CPU Burst as follows (there are no I/O Bursts).

P1: 10 3

P2: 5 12

P3: 7 2

For FCFS scheduling

(a) Complete the execution diagram,

(b) Calculate total waiting time for every process, and

(c) Calculate the average waiting time for all processes.

For RR scheduling with a time quantum of 5 milliseconds

(d) Complete the execution diagram,

(e) Calculate total waiting time for every process, and

(f) Calculate the average waiting time for all processes.

2) We have 5 processes, P1 through P5, and they arrive at 1, 2, 4, 4 and 5 milliseconds respectively, and they have the following CPU Burst times respectively: 9, 8, 3, 10, and 4.

For SRT scheduling,

a) Complete the execution diagram,

b) Calculate total waiting time for every process,

c) Calculate the average waiting time for all processes. Assume negligible context switch time.

d) Explain how priorities can be used in non-preemptive and preemptive scheduling, and list two examples.

3) Using SRT (Shortest Remaining Time) scheduling, you have 5 processes, P1 through P5, that arrive at 0, 2, 4, 6 and 8 milliseconds respectively, and they have the following CPU Burst times respectively: 15, 10, 4, 9, 2. There are no I/O bursts.

For SRT scheduling, (a) complete the execution diagram, (b) calculate total waiting time for every process, and c) calculate the average waiting time for all processes. Assume negligible context switch time.

Calculate the total turnaround time required for each of the five processes.

Assignment #2

We have just 3 processes, P1, P2 and P3, and they arrive at 1, 15 and 23 milliseconds respectively, and they each have two CPU Burst as follows (there are no I/O Bursts).

P1: 10 3

P2: 5 12

P3: 7 2

For FCFS scheduling

(a) Complete the execution diagram,

(b) Calculate total waiting time for every process, and

(c) Calculate the average waiting time for all processes.

For RR scheduling with a time quantum of 5 milliseconds

(d) Complete the execution diagram,

(e) Calculate total waiting time for every process, and

(f) Calculate the average waiting time for all processes.

2) We have 5 processes, P1 through P5, and they arrive at 1, 2, 4, 4 and 5 milliseconds respectively, and they have the following CPU Burst times respectively: 9, 8, 3, 10, and 4.

For SRT scheduling,

a) Complete the execution diagram,

b) Calculate total waiting time for every process,

c) Calculate the average waiting time for all processes. Assume negligible context switch time.

d) Explain how priorities can be used in non-preemptive and preemptive scheduling, and list two examples.

3) Using SRT (Shortest Remaining Time) scheduling, you have 5 processes, P1 through P5, that arrive at 0, 2, 4, 6 and 8 milliseconds respectively, and they have the following CPU Burst times respectively: 15, 10, 4, 9, 2. There are no I/O bursts.

For SRT scheduling, (a) complete the execution diagram, (b) calculate total waiting time for every process, and c) calculate the average waiting time for all processes. Assume negligible context switch time.

Calculate the total turnaround time required for each of the five processes.

You'll get a 20.2KB .DOCX file.