This project was successfully completed by athukoralakasun for $35 USD in a day.Get free quotes for a project like this
Project Budget$10 - $30 USD
Completed In1 day
CSCE 5640, Fall 2016
For this project you may be working in groups of two. Each member of your group must sign up on the corresponding project sheet in order to receive a grade. Your task is to implement a semaphore-based solution to the problem stated below.
Consider a system with N blocks of storage, each of which holds one unit of information (e.g. an integer, character, or employee record). Initially, these blocks are empty and are linked onto a list called freelist. Three threads communicate using shared memory in the following manner:
Shared Variables: freelist, list-1, list-2: block (where block is some data type to hold items)
var b: pointer to type block;
var x,y: pointer to type block;
use_block_x_to_produce info_in_y(x, y);
var c: pointer to type block;
Using the POSIX library, rewrite the code for the threads, using semaphores to implement the necessary mutual exclusion and synchronization. The solution must be deadlock-free and concurrency should not be unnecessarily restricted.
Looking to make some money?
- Set your budget and the timeframe
- Outline your proposal
- Get paid for your work
Hire Freelancers who also bid on this project
Looking for work?
Work on projects like this and make money from home!Sign Up Now
- The New York Times
- Wall Street Journal
- Times Online