1 / 11

Chapter 9 Homework Solutions

Chapter 9 Homework Solutions. 9.1, 9.4, 9.14, 9.16. 9.1 Consider the following set of processes:. Average. 9.1 Consider the following set of processes:. 9.4 Favors I/O-bound processes:

tia
Download Presentation

Chapter 9 Homework Solutions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 9 Homework Solutions 9.1, 9.4, 9.14, 9.16

  2. 9.1 Consider the following set of processes:

  3. Average

  4. 9.1 Consider the following set of processes:

  5. 9.4 Favors I/O-bound processes: If a process uses too much processor time, it will be moved to a lower-priority queue. This leaves I/O-bound processes in the higher-priority queues.

  6. 9.14 Favors I/O-bound processes: If a process uses too much processor time, it will be moved to a lower-priority queue. This leaves I/O-bound processes in the higher-priority queues.

  7. 9.16 Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have estimated running times of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9 and 4, respectively, with lower value corresponding to higher priorities. For each of the following scheduling algorithms, determine the turnaround time for each process and the average turnaround time for all five jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are processor bound. (a) round robin with a time quantum of 1 minute (b) priority scheduling (c) FCFS (run in order 15, 9, 3, 6 and 12) (d) Shortest job next.

  8. (a) round robin with a time quantum of 1 minute Sequence with which processes will get 1 min of processor time:The turnaround time for each process: A = 45 min, B = 35 min, C = 13 min, D = 26 min, E = 42 min The average turnaround time is (45+35+13+26+42) / 5 = 32.2 min

  9. (b) Priority scheduling The average turnaround time is: (9+21+36+39+45) / 5 = 30 min

  10. (c) FCFS (run in order 15, 9, 3, 6 and 12) The average turnaround time is: (15+24+27+33+45) / 5 = 28.8 min

  11. (d) Shortest job next.The average turnaround time is: (3+9+18+30+45) / 5 = 21 min

More Related