Find Jobs
Hire Freelancers

I need a C Programmer

$30-250 USD

Completed
Posted over 4 years ago

$30-250 USD

Paid on delivery
Operating Systems: C PROGRAM (single standard .c file): I need to use the concept of POSIX threads, semaphores and mutex locks. Consider a very small bank: XYZ. This bank has only one cashier (aka bank teller or customer representative) and a small waiting room for any incoming customers while the cashier is busy with other customer. There is a sofa which can only hold 5 people at maximum. The cashier can only serve one customer at any time. When the cashier is serving one customer, other customers have to wait in the sofa. If there are already 5 people waiting for their turn and the sixth person comes to the bank, then he/she just leaves the bank. Before the customer is being served, the customer needs to enter the account number and each customer will be serviced on first come first served basis. Use separate Pthreads to create N customers and cashier. Each of these customers as well as the cashier should run as a separate thread. When the customer is being serviced, print the message clearly saying that the customer with account number is being serviced. Assume each customer is done in 5 seconds. You also need to display the waiting list when the customers comes in and when the customer is serviced. You need to display if any customer leaves the bank without getting service (due to the limit of 5 people already waiting). If there is no customer at any time, the cashier just waits for the arrival of customer. GENERAL IDEA: Basically you take an argument from the command line for number of threads = n. Make an global array of int[5] for the FIFO queue. Create a cashier thread. Then in a loop with an arbitrary delay (you can spawn threads) create n customer threads each with a unique id. The customer threads attempt to get on the queue, if its full they quit out, otherwise they put their id in the array. The cashier takes the left most id from the queue whenever possible, erases it from the queue and shifts the rest of the values to the left, waits 5 sec, and repeats. When the cashier finishes with a customer, the customer thread quits. NOTE: You should have it print out info for each of these steps from all of the threads whenever they happen, plus the state of the queue whenever it changes.
Project ID: 22207804

About the project

11 proposals
Remote project
Active 5 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
I have done simulation task, like yours. C and Linux are my top level skills. Threading is my special skill. Can do your task for a few hours.
$70 USD in 1 day
5.0 (348 reviews)
7.2
7.2
11 freelancers are bidding on average $177 USD for this job
User Avatar
Hello Sir, I am expert in it I can help you with it also I can start form now can we discuss ? I am waiting your response Thank you
$200 USD in 7 days
4.9 (39 reviews)
6.1
6.1
User Avatar
HI..I am proficient in C/C++ programming for multithreaded applications using POSIX threads along with semaphores/mutextes to sync them for access to shared resources and can write the C program as console with given functionality.
$100 USD in 2 days
4.9 (153 reviews)
6.3
6.3
User Avatar
Hello, I am pleasure with your job as detailed. Thank you for the job posting. It’s a pleasure to meet you. I’d really like to work with you on this one if possible! I do have a couple of questions, but first I’d like to make you an offer and some background so you can check my work out. I have been developing kind of project within 4+ years so I’m fluent experience to handle project. You’ll get all the expected stuff like a great professional service and a fast turnaround, at a bit less, and I get a bit more exposure. If the above offer sounds like something you would be interested in, I’d love to hear from you. Best regards, Adebayo
$30 USD in 1 day
4.8 (23 reviews)
5.7
5.7
User Avatar
hello, i have good background with simulation projects related to OS. have done quite a few in this regards. i can do this for you. Regards
$50 USD in 3 days
4.9 (69 reviews)
5.3
5.3
User Avatar
Hello friend, I did MS Software Engineering. I have 7 years of experience in software development. I can do any simple task (e.g. data structures or OOP) to complex problems (e.g. ML and AI). I work on JAVA, C, C++, Python, SQL, MySqL and Oracle. Please see my profile and reviews from my previous client. I guarantee quality work in less time. Contact me. Thanks
$140 USD in 7 days
4.9 (11 reviews)
4.8
4.8
User Avatar
Hi, I am George. I have read your project and really made me motivated to place a bid on your project. The main purpose of your project is how to use the thread in c programming. I have developed so many projects by using c so that thread problem is really basic one. Please message me and discuss more details. Regards.
$200 USD in 1 day
4.9 (6 reviews)
3.8
3.8
User Avatar
Dear Sir! I have 4+ years expert experiences with low level c programming and Linux programming. As you know, this project needs deep concepts of POSIX threads and mutex of them. And also many experiences. So, if you hire me, I'll do it very clearly and completely. Thanks.
$700 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello. I saw your description in carefully. I have an experience in C/ C++ . I can complete for several hours. please give me a chance to work with you. Thank for reading my cover letter.
$100 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi Your job is some interesting. With deep knowledge of C including thread, garbage collection in C, assemblies, kernel architecture on windows I will do it easily and clearly. You will check this with simple test. I hope to work with you. Thanks.
$200 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello There. How are you doing?. I have read the description, I have great experience doing similar jobs related to these skills C Programming. Please start the chat so we can have detailed discussion. Thanks. Hi freelancin918! Please Send me a message so that we can discuss more about this project
$155 USD in 9 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Coweta, United States
5.0
2
Payment method verified
Member since Nov 7, 2019

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.