regarding semaphores and mutex locks!!! - open to bidding

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

Jurassic Park consists of a dinosaur museum and a park for safari tiding. There are n passengers and m single-passenger cars. Passengers wander around the museum for a while, then line up to take a ride in a safari car. When a car is available, it loads the one passenger it can hold and rides around the park for a random amount of time. If the m cars are all out riding passenger around, the passenger who wants to ride waits; if a car is ready to load but there are no waiting passengers, then the car waits. Use semaphores to synchronize the n passenger threads/processes and the m car threads/processes.

Submit all of your project’s source code using the submission command to the Linux server.

1. Write program in C language using Pthreads API to simulate the following IPC problem. Refer to Section 5.9.4 for specific instructions on mutex locks and semaphores.

2. If there are multiple files in your submission, you need to provide a makefile as well.

3. Make sure to use mutex locks or semaphores to synchronize the processes/threads.

4. Display messages to the screen to show the state of the system. A good way to validate your program running correctly is to perform some simple output messages to show the state of the system. You can experiment with these messages, but in general you want to demonstrate what each thread is doing. You can use an integer number to identify each thread.

5. If your program needs any arguments in command line (for example, number of passengers and number of cars), you need prompt proper message for the arguments and also valid the input.

6. You may consider how to terminate your program. There are many options. For example, terminate after serving the passengers a given number of times (each service means that one car is used by one passenger). You need to explain this in your code or output as message

Provide specific answers to the following questions.

1. How many threads/processes are there?

2. What does each thread/process simulate?

3. Will each thread/process be blocked at some time of simulation? If yes, explain the circumstances.

4. When will a blocked thread/process be waked up, and by whom?

5. How many semaphores are there in your project, what is the purpose for having each?

C Programming C++ Programming Database Development Linux Shell Script

Project ID: #15646599

About the project

9 proposals Remote project Active 6 years ago

9 freelancers are bidding on average $104 for this job

kaloyan13

I am available for work. Relevant Skills and Experience C, Linux, parallel programming Proposed Milestones $100 USD - Final milestone

$100 USD in 2 days
(579 Reviews)
7.5
koustav2006

Hi...i know how to write C program for process synchronization using semaphores and mutexes. i can complete the program in 48 hours. Relevant Skills and Experience I am programming in C and C++ for last 10 years. Pro More

$100 USD in 2 days
(192 Reviews)
6.6
khanhptktmt

Let me do this project, I will cover all requirements you described Relevant Skills and Experience I can work with c/c++ on linux, i 'm also familiar with multi-thread models Proposed Milestones $120 USD - complete p More

$120 USD in 3 days
(10 Reviews)
4.1
tutorsonlinehub

Let's chat and decide the price. No need to pay upfront money, first check the work and quality and if you like the work then make the payment. Relevant Skills and Experience 12 year Experience in programming. Propos More

$276 USD in 3 days
(5 Reviews)
2.2
BilalMusani

3+ years experience working with C/C++. Relevant Skills and Experience C++, linux, threading Proposed Milestones $105 USD - Complete project Is c++ allowed?

$105 USD in 3 days
(1 Review)
2.3
expertdeveloper8

Hello, I've reviewed your complete job description, and I fulfill all the qualifications required for this project. I have 8 years+ experience in C programming, Software Architecture, Linux, I have completed 300+ pr More

$50 USD in 3 days
(0 Reviews)
0.0
ssi599a5dc458c8b

Let’s chat and discuss about price and work. 12 years experience in same filed you will get 100% correct work. No need to pay upfront money first check work quality and if you satisfied then pay. Relevant Skills and E More

$111 USD in 3 days
(0 Reviews)
0.0
bda57d55230d3dd7

I have total 6+ years of experience in C programming ,also in multithreading and synchronisation.I can complete the Project in 3 days Relevant Skills and Experience I have total 6+ years of experience in C programm More

$45 USD in 3 days
(0 Reviews)
0.0
SayanProgrammer

Hey ! I'm SAYAN PROGRAMMER I've reviewed your complete job description, and I fulfill all the qualifications required for this project. I always try to provide good quality work to my clients. I have more than More

$30 USD in 2 days
(0 Reviews)
0.0