Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Operating Systems Assignment: Solving the Dining Philosophers Problem using POSIX API, Assignments of Operating Systems

Instructions for an operating systems assignment in the cmsi 387 course during spring 2009. Students are required to implement a solution to the dining philosophers problem using the posix api and include output statements for reporting program progress. Exercises from sgg (6.9 and 6.27) and two incorrect critical section observations for the dining philosophers and sleeping barber problems are also included.

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-qcu-1
koofers-user-qcu-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSI 387
OPERATING SY S T E M S
Spring 2009
Assignment 0409
This assignment is yet another “classic” operating systems programming task dealing with process synchro-
nization, supported by a smattering of exercises.
Not for Submission
We are still very much within chapter 6 of SGG.
For Submission
The Dining Philosophers Problem
Implement a solution to the dining philosophers
problem using the POSIX API. The bounded
buffer code given out in class may be used as a ba-
sis for your solution.
Make sure to include well-placed output statements
to report what’s happening in your program and
the state of things at any given time — that’s how
we’ll know whether your solution is working.
Commit your code to /homework/cmsi387/dp.
Exercises
Do the following exercises from SGG: 6.9 and
6.27. Hint: The answer to 6.27 can be found in one
of the “classic papers” given out in class.
Plus, name two things (for a total of four observa-
tions) that may happen in incorrect critical section
solutions to the dining philosophers and sleeping
barber (SGG Exercise 6.39) problems.
Submit your answers on hardcopy.
Extra Credit
The Sleeping-Barber Problem
You will get extra credit if you also implement a
solution to the sleeping barber problem (SGG Ex-
ercise 6.39). Commit this to /homework/cmsi387/sb.

Partial preview of the text

Download Operating Systems Assignment: Solving the Dining Philosophers Problem using POSIX API and more Assignments Operating Systems in PDF only on Docsity!

CMSI 387

O P E R A T I N G S Y S T E M S

Spring 2009

Assignment 0409

This assignment is yet another “classic” operating systems programming task dealing with process synchro- nization, supported by a smattering of exercises.

Not for Submission

We are still very much within chapter 6 of SGG.

For Submission

The Dining Philosophers Problem

Implement a solution to the dining philosophers problem using the POSIX API. The bounded buffer code given out in class may be used as a ba- sis for your solution. Make sure to include well-placed output statements to report what’s happening in your program and the state of things at any given time — that’s how we’ll know whether your solution is working. Commit your code to /homework/cmsi387/dp.

Exercises

Do the following exercises from SGG: 6.9 and 6.27. Hint: The answer to 6.27 can be found in one of the “classic papers” given out in class. Plus, name two things (for a total of four observa- tions) that may happen in incorrect critical section solutions to the dining philosophers and sleeping barber (SGG Exercise 6.39) problems. Submit your answers on hardcopy.

Extra Credit

The Sleeping-Barber Problem

You will get extra credit if you also implement a solution to the sleeping barber problem (SGG Ex- ercise 6.39). Commit this to /homework/cmsi387/sb.