Find Jobs
Hire Freelancers

Single Producer and multiple consumer using multithreating

$30-250 USD

Zamknięte
Opublikowano ponad 7 lat temu

$30-250 USD

Płatne przy odbiorze
In this project, we simulate a tandoori chicken lunch buffet restaurant with one chef and multiple guests, which is similar to a single producer/multiple consumers problem. We implement one program with multiple threads, each of which holds either a chef or a guest. We also apply one synchronization tool – semaphores, which can solve an issue for synchronizing common resources with multiple threads. Through this project, we will learn how to create multi-threaded process and how to synchronize threads using semaphores. Introduction A. Producer - consumer problem The restaurant resembles a producer consumer problem: in a producer side, chefs are cooking and providing food, guests are trying to eat it when it is available. When simulating the restaurant, we have some issues, each of which can be utilized by using concepts learnt in the lectures. First, we need executable units, each of which can run simultaneously during execution. Also some resources such as food and dining tables should be shared by all guests. Multiprogramming can be a good approach, but it brings us other issues we need to consider – parallel programming or even concurrent programming. Therefore, we will apply alternative approach using multithreading, which costs less than the approaches. We will briefly review this concept in the subsection B. Second, we should manage the shared resources, e.g., food and dining tables, without any conflicts. Two guests may race to get one food, and the racing game will cause some unhappy and uncomfortable situation. These resources are so critical that we need to have a powerful tool. We can address this issue and find a powerful solution – semaphore. Semaphores can enable us to access the critical resources without any conflicts. We will briefly review this concept in the next subsection C. For simplifying this project, we model a small restaurant in which one chef works. B. Multi-threaded process Process defines an executable unit to perform a task, which is called a thread. If the process needs to run one task at the one moment, one thread is enough to be created, because the created thread may hold the next task. This process is called a single-threaded process, and this design does not fit for processes which needs to run multiple tasks simultaneously. This issue is solved by multi-threaded design, in which multiple threads can be created and run. For more information, review the chapter 4. CS 5500 Project 2 University of Central Missouri 2 C. Semaphores When multiple threads are running simultaneously, they may access the same resources declared as global variables. It has many potential problems because some changes by one thread affect other threads which need the previous information. This conflict may cause severe problems and must be avoided. Synchronization tools are developed to solve this problem. Semaphores are one of the tools. There are two types of semaphores – binary semaphore (similar to mutex) and counting semaphore. A thread which obtains the semaphore can access the critical resources, whereas other threads should wait until the semaphore is available to get. Using the semaphores, we can control accesses to the critical resources. For more information, review the chapter 5. III. Implementation The program has the similar format as the first project. When user starts the program, it will show the prompt after group ID consisting of section # and group # (that is, section#_group#> $). To simulate the restaurant, user will the following command with three parameters: tcr -option -Number of cooked food –Number of dining table You have any question mail me.
Identyfikator projektu: 11780874

Informację o projekcie

11 ofert
Zdalny projekt
Aktywny 7 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
11 freelancerzy składają oferty o średniej wysokości $129 USD dla tej pracy
Awatar Użytkownika
hi. I have a lot of experience in Semaphores and threads. I can easily complete your task. we can have a chat. thanks
$80 USD w 1 dzień
4,9 (350 opinii)
7,2
7,2
Awatar Użytkownika
Hi there, I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details. Thanks.
$50 USD w 1 dzień
5,0 (519 opinii)
7,1
7,1
Awatar Użytkownika
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similar to a compiler, and is 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 w 2 dni
4,9 (105 opinii)
6,8
6,8
Awatar Użytkownika
Hello, I am expert in java/c/c++ and i can deliver your task in the least time and least payments. The code will be well commented and well formatted for better understanding. I believe in long term relations so first check your work then release the payments. Pm me for further details. Thank You!
$100 USD w 2 dni
4,9 (75 opinii)
5,3
5,3
Awatar Użytkownika
Hello Sir I have a client form the states, last summer he had Operating Systems as his subject and I helped him in mostly all of his assignments.. i.e. scheduling problems, synchronization problems etc also the final project which was about Minix OS. (I can show you all those codes if you want, also the problems) Point is that I am good at the OS concepts, I know how to deal university assignments and once you have worked with me, you will not need to find anybody else for your later jobs. Your current problem is about Synchronization and if you are using that red book it is in the chapter with Monitors etc. So feel free to send me a message anytime. Also the project summary mentions some project 1, we may need that as well. Thanks Man
$222 USD w 3 dni
5,0 (13 opinii)
4,3
4,3
Awatar Użytkownika
Over 2.5 years of experience in Verilog RTL Design, Microcontroller Projects and Algorithm Design in MATLAB in Industry and Academia. My past projects include: - PHY Layer Design on FPGA for Software Defined Radio Project for Center for Advanced Research in Engineering, Islamabad - Content Aware Image Processor Design on FPGA and ASIC for my Masters Thesis - Memory controller design for Hybrid NAND Flash Disks - Interfacing Gyro+Accelerometer using Arduino Uno for Human Focus International - Algorithm Design in Simulink and MATLAB
$50 USD w 3 dni
4,4 (2 opinii)
1,5
1,5
Awatar Użytkownika
i am software engineer with a degree in CS. since I had written programs like these during my engineering days I think I will be able to relate what you actually want out of this assignment. looking forward to work with you thanks Avinash
$188 USD w 2 dni
5,0 (2 opinii)
0,8
0,8
Awatar Użytkownika
I am RTOS developer. I always write multithread, multiprocess application. I have many process, thread isolation code. This is so simple for me.
$111 USD w 2 dni
0,0 (0 opinii)
0,0
0,0

O kliencie

Flaga UNITED STATES
United States
0,0
0
Członek od paź 13, 2016

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.