Assignment4-POSIX

Assignment4-POSIX - CSCI 5103 (Fall 2010) Assignment 4 (...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCI 5103 (Fall 2010) Assignment 4 ( 100 points) Due October 28, 2010 This assignment may be done individually or in a group of two students Objective: The objective of this assignment is to acquire familiarity with using POSIX thread programming primitives and how to synchronize POSIX threads through different POSIX synchronization primitives. Specifically you will implement Reader-Writer synchronization using POSIX thread programming. Problem Statement: In this assignment you will implement Reader-Writer synchronization through POSIX threads. You will implement a multi-threaded program with various threads, each thread will be either a Reader or a Writer. The writer threads will write to a common file and reader threads will read from this file. This Reader-Writer problem has following requirements in addition to usual reader-writer and writer-writer mutual exclusion 1. Any number of readers can read concurrently 2. Writers can not execute concurrently 3. While any writer is waiting, no more than P readers will get chance to execute their read operations before any writer is allowed to write. 4. If any reader is waiting, no more than Q writers will get chance to execute their write operations before any reader is allowed to execute its read operation. Writer Functionality: Each Writer will have a unique id called as writer-id. For example Writer 1 will have id W1, Writer 2 with W2 and so on. In each write operation a writer will generate write items which is a pair of
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/06/2012 for the course CSCI 5103 taught by Professor Staff during the Fall '08 term at Minnesota.

Page1 / 3

Assignment4-POSIX - CSCI 5103 (Fall 2010) Assignment 4 (...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online