Find Jobs
Hire Freelancers

Solve and write the specified synchronization problem using pthread & C.

$10-30 USD

Opravljeno
Objavljeno pred približno 6 leti

$10-30 USD

Plačilo ob dostavi
Write a multithreaded car park simulator program in C as follows: 1. Five drive-in threads (simulating in-valets) should randomly move cars into the car park 2. Two drive-out threads (simulating out-valets) should randomly take cars out of the car park 3. A monitor thread should periodically print out a map of the car park showing the parking slots and the identities of the currently parked cars in the occupied slots. You can do this by using one monitoring thread, 5 producer threads (simulating arrivals) and 2 consumer threads (simulating departures) with a bounded buffer (simulating the car park) of integers (simulating cars and car identities). The capacity of the car park (the buffer size) should be supplied to your program as a command line parameter. Requirements: • Use Ptread Locks for both synchronization and mutual exclusion. • Implement mutual exclusion where appropriate. • Do not remove cars from an empty car park. • Do not add cars to a full car park. • Avoid busy-waiting, starvation and deadlocks. • Each producer/consumer thread must pause for a random period (up to 1s) between parking and/or removing a car. • Each producer/consumer thread must pause for a random period (up to 0.2s) in its critical section. • The monitor thread should periodically print out the current contents of the car park. • Use pthread_barrier_init and pthread_barrier_wait to ensure that all producer and consumer threads begin producing/consuming at the same time. • Your simulator shall continue working until it is interrupted from the keyboard by control-c. The output from the monitor thread must clearly show that your simulator is working as specified above. Study the output of your program to check it is operating properly, i.e. cars are continuously parking and leaving, consistently, no deadlock, no starvation, and no busy-waiting. What to turn in: 1. Your program design document in .pdf form. 2. The fully documented, commented and working C program, in .c file(s). 3. A meaningful sample of your program’s output in .pdf form. 4. A statement report of your observations and comments about your program output in .pdf. 5. All the above in one .zip file, that also includes your cover page and the executable file(s)
ID projekta: 16481192

Več o projektu

12 ponudb
Projekt na daljavo
Aktivno pred 6 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
Dodeljeno:
Avatar uporabnika
Enough experience with multi thread programs. Low bid Please consider my candidature for the job
$25 USD v 3 dneh
4,1 (2 ocen)
2,6
2,6
12 freelancerjev je oddalo ponudbo s povprečno vrednostjo $102 USD za to delo
Avatar uporabnika
Hi! I'm interesting your project very well. I am mastering c and I'm a good Algorithmer. And also I have many experience and good skill about pthread using semaphore or mutex. Let's go ahead with me
$100 USD v 1 dnevu
4,9 (329 ocen)
7,8
7,8
Avatar uporabnika
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I made many great projects using c++, for example, I made the tools which could convert java codes into c++ scripts, of course garbage collection included, this was very similar to a compiler, and was very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$100 USD v 2 dneh
4,8 (165 ocen)
7,1
7,1
Avatar uporabnika
Hy I am software engineer and have completed many programming projects. Feel free to contact with me via chat box. Thank you
$150 USD v 1 dnevu
4,9 (77 ocen)
6,1
6,1
Avatar uporabnika
Hello, I have 30 years experience programming in C, including many examples of the producer/consumer problem using threads. I will create a C program to simulate a carpark as an application of the producer/consumer problem as described in your posting. I will deliver the C program and a design document (in Word) to describe the organization of the code to satisfy all its requirements. I never supply sample runs for students. These are your responsibility. A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$153 USD v 3 dneh
4,9 (190 ocen)
6,2
6,2
Avatar uporabnika
I am an expert at Synchronization Mechanisms, and a final year CS undergrad at IIT Bombay (Best College in India). I can help in this!
$30 USD v 1 dnevu
5,0 (14 ocen)
4,3
4,3
Avatar uporabnika
Salam, I'm from morocco, I can develop this project for you, but the price you have proposed is not good for such task, if you are interested I can do it for you, I'm a senior software engineer, with 6 years experience in the multithreading environments.
$222 USD v 1 dnevu
5,0 (5 ocen)
3,8
3,8
Avatar uporabnika
Hello. I have an experience in multithreading programming. I worked with multithreading TCP chat. I may prepare your task in 7-8 days
$111 USD v 7 dneh
0,0 (0 ocen)
0,0
0,0

O stranki

Zastava SAUDI ARABIA
Dhahran, Saudi Arabia
0,0
0
Plačilna metoda je verificirana
Član(ica) od mar. 13, 2018

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.