c programming question sleeping problem

timer Asked: Nov 4th, 2016

Question description

Do it according to specificatins in the file

CSEN5322 – Operating Systems Homework-4 Student Name Student ID Section Date The Sleeping Barber Problem 7pts A barbershop consists of a waiting room with n chairs and a barber room with one barber chair. If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop. If the barber is busy but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Using POSIX Semaphores, write a multithreaded C program to coordinate the barber and the customers. The following link provides you with helpful details about the problem: http://en.wikipedia.org/wiki/Sleeping_barber_problem This link below will provide you with details about synchronizing threads using POSIX semaphores: http://www.csc.villanova.edu/~mdamian/threads/posixsem.html       This programming assignment is to be completed individually. Your code must compile and run. Remember to include the necessary documentation in the source code and the output. Hand in a copy of the source code and the copy of the output. Review the grading algorithm before you submit your work! Remember that all Homework/Assignments are to be completed individually. All violations of the TAMUK honor code will be reported. Duplicate programs will not receive credit. Further consequences may apply. Grading algorithm 12% - Style (5) Prologue comments including: Programmer name, Course and section #, Program description, Date … (4) Document each variable and constant (3) Indentation and spacing 80% - Correctness of your algorithm 8% - Attractiveness of the output (2) Output correctly to monitor. (2) Output contains a heading (2) Programmer name and course/section info should be included in the output (2) Labels, spacing, no misspelled words Total 100% in

Tutor Answer

(Top Tutor) Studypool Tutor
School: Cornell University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors