Semaphore ImplementationYou are to design and develop your own implementation of a Semaphore, and then use that semaphore to develop the solution to the consumer-producer problem described below. The semaphore data structure and operations (P, V, initialize) that you design must include a blocking feature to eliminate (or really, reduce) busy-waiting. (You should consider using your spin-lock solution in implementing the semaphore operations.) Using your semaphore mechanism, you should implement the necessary code for CSenter and CSexit that will protect a critical section of code. In effect, your are simulating the semaphore operations. You are not permitted to use semaphores or semaphore operations that are part of the operating system; you are constructing your own!

The problem that you are to solve is a consumer-producer problem. Using **at least** four processes ( two or more producer processes and two or more consumer processes), develop a concurrent program that produces values and consumes them. The values that are produced should be placed in a multi-element shared buffer. The **shared buffer** is one that is **in main memory** and accessible to all of the processes of the program. Obviously, you should use your semaphore implementation to ensure that the processes properly and safely access this shared buffer.

Consumer processes and producer processes should be able to execute concurrently, whenever the buffer state has one or more filled or or one or more empty cells, respectively.

You are to design a method of demonstrating and testing the program so that you can assure yourself, and me, that it is working properly, for varying speeds of producers and consumers. Refer to the document on materials to submit with your homework.

<!--[if !supportEmptyParas]-->

<!--[if !supportEmptyParas]-->

Due: Sunday November 2

## Deliverables


## Platform


Habilidades: Programação C, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: use data structure programming, semaphore programming, programming data structure, operating system programming, implementation data structure, help programming homework, data structure solution, data structure problem, data structure operations, data structure implementation, data structure programming, programming homework help, concurrent programming, producer consumer problem, p v, described structure, unix consumer producer problem, producer problem unix, unix program producer consumer, semaphores shared memory, program consumer problem unix, semaphore code program, consumer program unix, homework problem, producer consumer problem using

Acerca do Empregador:
( 5 comentários ) United States

ID do Projeto: #3001081

5 freelancers estão ofertando em média $15 para este trabalho


See private message.

$21.25 USD em 1 dia
(12 Comentários)

See private message.

$12.75 USD em 1 dia
(13 Comentários)

See private message.

$8.5 USD em 1 dia
(13 Comentários)

See private message.

$11.05 USD em 1 dia
(16 Comentários)

See private message.

$21.25 USD em 1 dia
(0 Comentários)