1 / 15

OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL

OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL. Chap. 2.3. Classical IPC Problems Chap. 2.4. Scheduling. Lecture 6, 22 October 2013. Annotated by B. Hirsbrunner , University of Fribourg, 2012. The Dining Philosophers Problem (1).

Download Presentation

OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S. TANENBAUM ALBERT S. WOODHULL

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. OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONThird EditionANDREW S. TANENBAUMALBERT S. WOODHULL Chap. 2.3. Classical IPC ProblemsChap. 2.4. Scheduling Lecture 6, 22 October 2013 Annotated by B. Hirsbrunner, University of Fribourg, 2012

  2. The Dining Philosophers Problem (1) • Philosophers eat/think • Eating needs 2 forks • Pick one fork at a time • How to prevent deadlock ? • How to prevent livelock ? • How to prevent starvation ? • Fig. 2-18. Lunch time in the Philosophy Department Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  3. The Dining Philosophers Problem (2) Fig. 2-19. A nonsolution to the dining philosophers problem • Figure 2-19. A nonsolution to the dining philosophers problem. Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  4. The Dining Philosophers Problem (3) . . . • Fig. 2-20. A solution to the dining philosophers problem Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  5. The Dining Philosophers Problem (4) . . . . . . • Fig. 2-20. A solution to the dining philosophers problem (part 2) Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  6. The Dining Philosophers Problem (5) . . . • Fig. 2-20. A solution to the dining philosophers problem (part 3) Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  7. The Readers and Writers Problem (1) . . . • Fig. 2-21. A solution to the readers and writers problem : a writer has to wait until no more reader is active Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  8. The Readers and Writers Problem (2) . . . • Fig. 2-21. A solution to the readers and writers problem (part 2) Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  9. The Sleeping Barber Problem (1)

  10. Solution to sleeping barber problem

  11. 2.4 Scheduling Process Behavior • Fig. 2-22. Bursts of CPU usage alternate with periods of waiting for I/O. (a) A CPU-bound process. (b) An I/O-bound process. Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  12. When to Schedule • When scheduling is absolutely required: • 1. When a process exits. • 2. When a process blocks on I/O, or a semaphore. • When scheduling usually done (though not absolutely required) • 1. When a new process is created. • 2. When an I/O interrupt occurs. • 3. When a clock interrupt occurs. Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  13. Scheduling Algorithms : goals • Fig. 2-23. Some goals of the scheduling algorithm under different circumstances Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  14. Scheduling Algorithms: batch systems • First-Come First Served • Shortest Job First • Shortest Remaining Time Next • Three-level Scheduling : Admission, CPU, Memory Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

  15. Scheduling Algorithms: interactive systems • Round-Robin • Priority Scheduling: • with priority classes • Shortest Process Next: • with aging techniques • Guaranteed Scheduling: • each of the n processes obtains 1/n CPU cycles • Lottery Scheduling • each process p obtains np tickets • … Tanenbaum & Woodhull, Operating Systems: Design and Implementation, (c) 2006 Prentice-Hall

More Related