Find Jobs
Hire Freelancers

c programming

$250-750 USD

Cancelled
Posted about 3 years ago

$250-750 USD

Paid on delivery
you will write a program that will package books published by different publishers. You will have publisher and packager threads. After publishers publish books, packagers package the books published.  The number of publisher types, publisher and packager threads will be given as command line argument. (i.e. You will have n number of publisher types. Each publisher type will have m publisher threads (at total, there will be m*n publisher threads). There will be k number of packager threads. All these numbers (n, m, and k) will be given as command line arguments.)  Each publisher type threads will publish one type of book. The number of books that will be published by each publisher type will be given as command line argument.  The books will be named according to its publisher type, i.e., the lth book published by the ith type of publisher will be named Booki_l.  After publishing a new book, each publisher thread will put it in a buffer that is shared among the same type of publisher. (Each publisher type will have its own buffer.) The buffers’ initial size will be given as command line argument.  When its buffer is full, the publisher thread that wants to put a book will double the size of the buffer.  When each publisher thread publishes required number of books, they will exit the system.  Packagers package the books published. They will take books from the buffers (each packager thread can take books from all buffers).  Each packager thread will put some number of books in a package. This number will be given as command line argument.  After one package is prepared, packager thread will prepare another package.  Packagers will select the book type to put into package randomly. Then, it will take the book from the related buffer and put it into its own package.  If a buffer of the publisher type randomly chosen by the packager thread is empty, the packager thread will check whether there are threads left in the system that belongs to chosen type. If so, it will wait for the publisher thread to publish a book and put it into the buffer. Otherwise, it will select another buffer. 1  If a packager thread finds all buffers empty after all publisher threads exit the system, it will print the message: “Only i of j number of books could be packaged.” and leave the system. So, you need to keep track of how many publisher threads are left for each type. Program Details  The user will execute the program specifying the number of threads to be created of each kind. You will then create the specified number of threads of each type.  The same type of publisher threads will share the same buffer. Make sure that no multiple publisher thread will attempt to put their books on the same place of the buffer.  Note that packager threads can access to all buffers. Make sure that no multiple package thread will attempt to get the same book from the buffer.  Make sure that publisher and packager threads work concurrently. This means that when a publisher thread puts and item to the buffer, no packager can take an item from the buffer.  The main thread is responsible for creating all of the threads and waiting for them. Note that, all of the threads has to exist in the system at the same time, and you have to work on synchronizing them.  All the threads have to print information about their job on the screen (see the example execution below).  Note that there are global buffers requested and the buffers can be accessed by many threads of different types so a synchronization and mutual exclusion are necessary for the buffer. This can be achieved by using the semophores and mutexes.  The global buffers have to be created at the very first time a thread needs to use it by that thread.  Preserving consistency and preventing deadlocks are major issues to be considered.  Your program will be executed as follows: o Example: ./[login to view URL] -n 2 3 4 -b 5 -s 6 7 o The -n option represents the type and number of threads. Here
Project ID: 28993350

About the project

6 proposals
Remote project
Active 3 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
6 freelancers are bidding on average $425 USD for this job
User Avatar
Hey there, I have 4 years of working experience in web technologies and I have a strong working knowledge of every possible framework which is in the market. In terms of client-end I know: C Programming Also I have done tons of work on freelancing career. I am waiting anxiously for a positive response from your side. And I have read your requirements as well. Thanks and regards, Awais
$750 USD in 11 days
5.0 (11 reviews)
6.8
6.8
User Avatar
Hi I have done threading and synchronization in c. I have read the description and I can help you solve this. If this interests you, I'd love to discuss this further in chat.
$250 USD in 2 days
5.0 (24 reviews)
5.0
5.0
User Avatar
hi, I have read the details of the project. I have completed many simple and complex projects with Visual Studio and C++, some linux-things too, I also do JAVA tasks on eclipse and netbeans. I have the knowledge of how to debug PHP issues,wordpress plugins that are buggy and need fixes.... or some extra functionality is needed. I have worked as a Windows desktop/embedded *C/C++(MT4, 5)/C# developer for over 6 years. I also like doing Javascript frontend things - especially some WebGL, SVG or similar graphics/canvas related things I would be glad if the opportunity of doing this task can be given to me. i'll await your message to have more discussion with you on the project. Kindly check my profile https://www.freelancer.com/u/mzdesmag to see my past works and reviews. Thanks.
$500 USD in 7 days
4.7 (7 reviews)
4.2
4.2
User Avatar
Hello, I am a C programmer and I made many programs with pthread on Linux. Your task looks like an extension of producer/consumer problem, I think it does not take much time to do it. Best regards,
$250 USD in 2 days
4.9 (17 reviews)
3.9
3.9
User Avatar
Hi there.I am very familiar with c/c++ language.I have already worked for 6 years dealing with algorithm & data structure.I've checked your attached project and I am very interested in your project. When do you need the project finished by? --------------------------------------------------- Hope to meet and have a talk. please contact me and discuss more detail Thank you.
$400 USD in 7 days
4.4 (15 reviews)
4.5
4.5
User Avatar
Hi Professional Greetings from Sanjay, hope my message finds you in good health. I am quite excited to take up this assignment. You would be delighted to see that I am very passionate and adheres to one of the best industry standards and practices. I am experienced in developing complex and large-scale Web, Desktop and Mobile applications. I have 6+ years of development experience in various technologies I have knowledge of Web Development in various technologies as , #ASP .NET Technologies(VB, C# with MVC, Dot Net Core) both web and desktop applications(WinForms,WPF) #MS Power BI #MS Sql, MySql, PostgreSql. #MS Outlook,MS Excel, MS Access #Bootstrap, JavaScript, Jquery, Html, CSS #Angular #Python #C++,C #Xamarin **************************************************** You can look for my cover letter at- https://www.freelancer.com/u/sanjaykumar0111 **************************************************** #the bid price and time is a simple placeholder as of now, it can vary as per requirements. I would love to discuss the work with you, Please initiate chat so we can discuss better. Sincerely Sanjay Kumar
$400 USD in 3 days
5.0 (1 review)
0.4
0.4

About the client

Flag of UNITED STATES
dbrsnu6, United States
0.0
0
Member since Jan 17, 2021

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.