Question
  1. Assume you have four processes with the following attributes: Process Total CPU Time A L 10 Arrival Time 0 2 6 CPU Burst 5 1

  2. 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 time, we will assume that the I/O bursts are using separate resources on the system and are not competing; there is no need to simulate processes waiting in an I/O queue for these simulations.

    • Assume you have four processes with the following attributes: (attached in the photo)

    • Perform a scheduling simulation for these four processes in the manner we covered in class, using the following algorithms:

    • First Come, First Served (FCFS)

    • Round Robin with Time Slice = 1

    • Round Robin with Time Slice = 3

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

      For each of the four simulations, you must submit the following items listed below:

    • A timeline of the simulation (you may draw these by hand and scan/photograph them, or create them electronically using your word processor or graphics program)

    • Calculate the turnaround time, queue waiting time, and response time for each process

    • Calculate the average turnaround time, average queue waiting time, and average response time among all processes

    • Calculate the percentage of idle time for the CPU overall

    • Calculate the number of context switches involved (including whole and half context

      switches)

      Finally, write a brief summary indicating which scheduling algorithm you think performed the best for this set of processes and give reasons supporting your opinion.

    • Shortest Job (CPU Burst Time) First (no pre-emption, as we covered in class)

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

FCFS-First Come First Serve

Process Arrival Time(A.T) Total CPU Time Completion Time(C.T) Turnaround Time(TAT) Waiting Time(W.T)
A 0 10 10 10 0
B 2 5 15 13 8
C 6 12 27 21 9
D 11 8 35 24 16
Total 87 68 33

Gantt Chart

A B C D

0--------------------10----------------------15-----------------------27-----------------------35

TAT=CT-AT

WT=TAT-Total CPU Time

Average Turnaround Time=Total Turnaround Time/No. of processes

: 68/4=17

Average Waiting Time= Total Waiting Time/No. of processes

: 33/4=8.25

Average Completion Time=Total Completion Time/No. of processes

: 87/4=21.75

Round Robin with time slice=3

Process Arrival Time(A.T) Total CPU Time Completion Time(C.T) Turnaround Time(TAT) Waiting Time(W.T)
A 0 10 24 24 14
B 2 5 14 12 7
C 6 12 35 29 17
D 11 8 32 21 13
Total 105 86 51

Average Turnaround Time=Total Turnaround Time/No. of processes

: 86/4=21.5

Average Waiting Time= Total Waiting Time/No. of processes

: 51/4=12.75

Average Completion Time=Total Completion Time/No. of processes

: 105/4=25.4

Round Robin with time slice=1

Process Arrival Time(A.T) Total CPU Time Completion Time(C.T) Turnaround Time(TAT) Waiting Time(W.T)
A 0 10 25 25 15
B 2 5 13 11 7
C 6 12 35 29 17
D 11 8 29 18 10
Total 102 83 49

Average Turnaround Time=Total Turnaround Time/No. of processes

: 83/4=20.75

Average Waiting Time= Total Waiting Time/No. of processes

: 49/4=12.25

Average Completion Time=Total Completion Time/No. of processes

: 102/4=25.5

Add a comment
Know the answer?
Add Answer to:
This assignment requires you to create simulations for different scheduling algorithms commonly employed by operating systems...
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
  • 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...

  • (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)

  • 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...

  • Computer Science Help Instructions Consider the following set of processes, with the length of the CPU-burst...

    Computer Science Help Instructions Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Burst Time Process P1 P2 Priority 10 4 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts illustrating the execution of these processes using FCFS, a nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum 1) scheduling. b. What is the...

  • The following processes are being scheduled using a pre-emptive, priority-based, round-robin scheduling algorithm. Process Burst Time...

    The following processes are being scheduled using a pre-emptive, priority-based, round-robin scheduling algorithm. Process Burst Time Priority Arrival 20 20 0 20 25 45 55 5 5 5 15 Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is pre-empted by a higher-priority process,...

  • 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...

  • 2. The following processes have 4 CPU burst and 3 I/O bursts each. They are all...

    2. The following processes have 4 CPU burst and 3 I/O bursts each. They are all of the same priority and they arrive in the order P1, P2, P3 at time 0 CPUO 10 CPU 10 CPUI/O 10 CPU 10 10 10 P1 P2 P3 10 10 10 a. Draw three Gantt charts illustrating the execution of these processes using FCFS, SJF, and RR (quantum- 1t) scheduling b. What is the turnaround time of each process for each of the...

  • Description In this homework, you are asked to implement a multithreaded program that will allow ...

    Description In this homework, you are asked to implement a multithreaded program that will allow us to measure the performance (i.e, CPU utilization, Throughput, Turnaround time, and Waiting time in Ready Queue) of the four basic CPU scheduling algorithms (namely, FIFO, SJE PR, and RR). Your program will be emulating/simulating the processes whose priority, sequence of CPU burst time(ms) and I'O burst time(ms) will be given in an input file. Assume that all scheduling algorithms except RR will be non-preemptive,...

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

    Consider the following set of processes, with the length of the CPU burst given in milliseconds:ProcessBurst TimePriorityP1 54P231P312P472P543The 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 priority (a larger priority number implies a higher priority), and RR (quantum = 2). b. What is the turnaround time of each...

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