Operating systems design and implementation third edition andrew s tanenbaum albert s woodhull
This presentation is the property of its rightful owner.
Sponsored Links
1 / 15

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


  • 69 Views
  • Uploaded on
  • Presentation posted in: General

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Operating systems design and implementation third edition andrew s tanenbaum albert s woodhull

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


The dining philosophers problem 1

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


The dining philosophers problem 2

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


The dining philosophers problem 3

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


The dining philosophers problem 4

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


The dining philosophers problem 5

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


The readers and writers problem 1

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


The readers and writers problem 2

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


The sleeping barber problem 1

The Sleeping Barber Problem (1)


Operating systems design and implementation third edition andrew s tanenbaum albert s woodhull

Solution to sleeping barber problem


2 4 scheduling

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


When to schedule

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


Scheduling algorithms goals

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


Scheduling algorithms batch s ystems

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


Scheduling algorithms interactive systems

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


  • Login