1 / 45

Comparison of Process Scheduling Algorithms in Operating Systems

This homework assignment discusses the different process scheduling algorithms and their impact on response time, wait time, and turnaround time in operating systems.

morel
Download Presentation

Comparison of Process Scheduling Algorithms in Operating Systems

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. Homework 2 Sarah Diesburg Operating Systems COP 4610

  2. Why does OS loader set kernel mode? • OS needs to run with full privileges • Sets more restrictive user mode bit for user programs • Protects OS from errant user programs

  3. Time 700 800 0 100 200 300 400 500 600 Three Processes Process A Process B Process C

  4. Time 700 800 0 100 200 300 400 500 600 First In, First Out Process A Process B Process C FIFO C A B

  5. Time 700 800 0 100 200 300 400 500 600 First In, First Out Process A Process B Process C FIFO Average response time = [(300-50) + (500-150) + 0]/3 = 200 C A B

  6. Time 700 800 0 100 200 300 400 500 600 First In, First Out Process A Process B Process C FIFO Average wait time = [(300-50) + (500-150) + 0]/3 = 200 C A B

  7. Time 700 800 0 100 200 300 400 500 600 First In, First Out Process A Process B Process C FIFO Average turnaround time = [(500-50) + (900-150) + (300-0)]/3 = 500 C A A B B

  8. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C

  9. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C

  10. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A

  11. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A

  12. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C

  13. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C

  14. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B

  15. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B

  16. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B A

  17. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B A

  18. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B A C

  19. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B A C

  20. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B A C B

  21. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR C A C B A C B

  22. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR Average response time = [(100-50) + (300 – 150) + 0]/3 = 66.7 C A C B A C B

  23. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR Average wait time = {[(100–50) + (400–200)] + [(300–150) + (600–400)] + [0 + (200–100) + (500–300)]}/3 = [250 + 350 + 300]/3 = 300 C A C B A C B

  24. Time 700 800 0 100 200 300 400 500 600 Round Robin (Time slice = 100) Process A Process B Process C RR Average turnaround time = [(500 – 50) + (900 – 150) + (600 – 0)]/3 = 600 C A C B A C B

  25. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C

  26. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C

  27. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C A

  28. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C A

  29. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C A

  30. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C A B

  31. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN C A B

  32. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN Average response time = [(300-50) + (500-150) + 0]/3 = 200 C A B

  33. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN Average wait time = [(300-50) + (500-150) + 0]/3 = 200 C A B

  34. Time 700 800 0 100 200 300 400 500 600 Shortest Job Next Process A Process B Process C SJN Average turnaround time = [(500-50) + (900-150) + (300-0)]/3 = 500 C A B

  35. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C

  36. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C

  37. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C A

  38. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C A

  39. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C A C

  40. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C A C

  41. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C A C B

  42. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF C A C B

  43. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF Average response time = [0 + (500-150) + 0]/3 = 117 C A C B

  44. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF Average wait time = [0 + (500 – 150) + (250 – 50)]/3 = 183 C A C B

  45. Time 700 800 0 100 200 300 400 500 600 Shortest Remaining Time First Process A Process B Process C SRTF Average turnaround time = [(250 – 50) + (900 – 150) + (500 – 0)]/3 = 483 C A C B

More Related