Critical Section/Binary and Counting semaphores

Cancelled Posted Oct 23, 2015 Paid on delivery
Cancelled

Simulate one of the classical synchronization problems in order to see how the

(semi) critical section problem could be implemented using binary and counting semaphores.

5 processes are characterized by 3 readers and 2 writers.

Up to two reader processes can be inside their critical section without any writer process. Forwriter process to go into its critical section, it should check whether there is any reader or writer process is in the critical section.

Critical section in this problem is reading shared data buffer for reader and updating shared databuffer for writer processes. It is up to you to implement any shared data for readers and writers but you have to specify clearly following things in your sample output.

• When reader or writer enters its critical section, it has to report whether there are any reader(s)

or writer(s) other than itself.

• You may print out the data you read or write when you implement real buffer. (Optional)

• You have to print out “Panic Messages” when the rules behind this semi critical section problem are not observed.

In your main program, you run the random number generator function to choose process to execute. The chosen process starts (resumes) execution and after one instruction, it will be returned. (You should force each process run exactly one instruction then returns and waiting for its turn.)

You can implement this using switch statement in C++. Each process is one big switch statement and will be returned after each instruction. You need to keep track of program counter of each process to resume at the right place once it will be chosen to run by keeping global counter variable per process.

-Subproject 1: You should implement binary and counting semaphores as studied in the class forthis project.

-Subproject 2: You should implement testandset operation as studied in the class for this project.

C++ Programming Computer Support Mathematics

Project ID: #8754124

About the project

4 proposals Remote project Active Oct 30, 2015

4 freelancers are bidding on average $8/hour for this job

hbxfnzwpf

I am very proficient in java. I have 12 years java developing experience. I have worked for 5 years, my work is online game developing, and mainly focus on server side, the language is java under linux, I am proficint More

$15 USD / hour
(49 Reviews)
6.0
SharjeelSohail

A proposal has not yet been provided

$6 USD / hour
(54 Reviews)
4.6
FESTUS8340

I have gone through the tasks requirements and have ascertained that I am capable of handling the task within the required time frame and deliver one of the best articles relating to this topic. I love what I do and do More

$7 USD / hour
(3 Reviews)
0.6
davidalam

I am Senior in computer science with 10 years expertise, with proficiency in software development . Following are my area of expertise - servers, linux, vmware, windows - System / Windows / Desktop application develo More

$5 USD / hour
(0 Reviews)
0.0
elitesoft5

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have More

$5 USD / hour
(0 Reviews)
0.0
pony0621

A proposal has not yet been provided

$5 USD / hour
(0 Reviews)
0.0
naranimanish

Have been working with Linux Kernel Programming since more than 2 years. Have deep insights of C/C++ programming. Have experience of developing device drivers for USB 3 devices on Xilinx Zynq Embedded Platform I More

$5 USD / hour
(0 Reviews)
0.0