ITFN 2601 Introduction to Operating Systems - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

ITFN 2601 Introduction to Operating Systems

Description:

Locking the entire find fork' area? Steal your forks while no one else can. State Array? Track who has forks, who is waiting. Philosopher Locked Table. Readers ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 11
Provided by: daniels80
Category:

less

Transcript and Presenter's Notes

Title: ITFN 2601 Introduction to Operating Systems


1
ITFN 2601Introduction to Operating Systems
  • Lecture 3
  • IPC Problems

2
Agenda
  • IPC Problems
  • Dining Philosophers
  • Readers Writers
  • Sleeping Barber

3
IPC (Dining Philosophers)
  • Multiple processes attempting to obtain multiple
    resources
  • Not enough resources to satisfy all requests at
    all times (Wait necessary)
  • Why is this relevant?

4
Philosophers Demonstration
5
Philosopher Resolution?
  • Patterned locking?
  • Take left, then take right?
  • Locking the entire find fork area?
  • Steal your forks while no one else can
  • State Array?
  • Track who has forks, who is waiting

6
Philosopher Locked Table
7
Readers Writers
  • Multiple readers can co-exist
  • Two people can read the same page
  • Multiple writers cannot
  • Two people cannot write the same page, they will
    forever be getting in the way
  • Writers and readers cannot co-exist
  • Cannot read what is not written

8
Readers Writers (cont)
  • Reader on Reader
  • Allow it in
  • Reader on Writer
  • Writer on Writer
  • Must wait for Writer to finish
  • Writer on Reader
  • Must wait for Reader to finish

9
Sleeping Barber
  • How is this different from our sleep/wakeup
    examples?
  • Wakeup is issued by a consumer
  • Queue size limited
  • Customers go to wait-queue if available
  • Semaphores offer no count
  • Variable to count members of wait-queue

10
Summary
  • Multiple Resources
  • Multiple Consumers
  • Must deal w/ these problems using semaphores
    mutex
Write a Comment
User Comments (0)
About PowerShow.com