Programming assignment

Closed Posted Mar 14, 2003 Paid on delivery
Closed Paid on delivery

Programming assignment using C and Java. 3 questions. Programming Part 1. The program given uses the pthread mutexes to protect shared variables from concurrent access. Comment out all the calls to pthread_mutex to check if a race condition occurs in the absence of synchronization primitives. Explain what happens in the absence of synchronization primitives and why? Include 5 test runs. 2. Pthread mutexes can be considered binary semaphores. It is possible to implement a general counting semaphore using mutexes. Implement a counting semaphore using mutexes then use your counting semaphore to implement a solution for the producer ??" consumer problem with one producer and one consumer. The producer and the consumer must sleep for a random period after producing or consuming an item. Run the program using a buffer size of 10 and stop when 25 items have been produced and consumed. Make sure that both threads display enough information for verifying the program. Include 5 test runs. 3. Java supports several synchronization mechanisms including a mutex-like mechanism called lockObject. Use lockObjects to implement the dining philosophers problem.

## Deliverables

1) Complete and fully-functional working program(s) as well as complete source code of all work done. 2) Complete ownership and distribution copyrights to all work purchased.

## Platform

C, Java

C Programming Engineering Java MySQL PHP Software Architecture Software Testing

Project ID: #2916107

About the project

2 proposals Remote project Active Mar 25, 2003

2 freelancers are bidding on average $36 for this job

lalesculiviu

See private message.

$51 USD in 14 days
(18 Reviews)
4.2
ciphereye

See private message.

$21.25 USD in 14 days
(16 Reviews)
2.7