c++ Threads Homework

Completado Publicado Nov 22, 2015 Pagado a la entrega
Completado Pagado a la entrega

The question is on the document on page 17

Implement the Sushi Bar problem in explained with pseudo code in practice session 7.

1) You can implement either alternative solution (slide 20 or 22).

2) Do not implement the solution attempt in slide 19.

3) Create n threads where n is provided by the user.

4) Each thread should print the following messages when appropriate:

Thread i: j seats are empty so I sit.

Thread i: j seat(s) are empty but I wait. There are other k people waiting.

Thread i: I sit on the last seat. We are dining together now.

Thread i: I leave so j seats are empty now.

5) "// eat sushi" line in the pseudo code should be replaced with usleep(d) where d is a random integer between 100 and 1000. It is different for each thread and in each run.

6) Also add a random delay (usleep) to the beginning of the thread function. Delay duration should be between 0 and 1000000.

Good luck!

Programación en C++ Linux

Nº del proyecto: #8951221

Sobre el proyecto

14 propuestas Proyecto remoto Activo Nov 23, 2015

Adjudicado a:

xzan88

This is my offer.......................................................................................................................................................................................

$30 USD en 5 días
(116 comentarios)
6.4

14 freelancers están ofertando un promedio de $28 por este trabajo

lashabuxo

A proposal has not yet been provided

$25 USD en 1 día
(40 comentarios)
5.2
foxkode

I am expert in c,c++ and i have excellent skills in threads and there manipulation so I know how can we synchronize them. Thank you.

$25 USD en 2 días
(14 comentarios)
4.5
sheikhfarhanm

I have prior experience of linux, C++ and Posix API. I can provide well documented coded with clear variable names so its easy to understand.

$25 USD en 1 día
(6 comentarios)
3.9
kpol4k

Hi, I'm experienced C/C++ developer working curently in Mphasis Wyde as Delivery module leader. I done many projects with liux threads and C++11 threads. I will provide solution within 24 h

$25 USD en 3 días
(16 comentarios)
3.9
StrongDecs

Hello here, This task would be done during a day. Please contact me if it makes you interested. Thank you,

$55 USD en 1 día
(12 comentarios)
4.0
thanhtuan5787

A proposal has not yet been provided

$25 USD en 1 día
(6 comentarios)
2.6
aaatifkhannn2010

A proposal has not yet been provided

$30 USD en 2 días
(1 comentario)
2.0
dcorderoch

A proposal has not yet been provided

$35 USD en 2 días
(2 comentarios)
1.0
maksimpustovoyt

A proposal has not yet been provided

$15 USD en 1 día
(0 comentarios)
0.0
arupby

I am an expert c++ programmer working in MNC for 12 years . I have developed many C++ application earlier.

$15 USD en 20 días
(0 comentarios)
0.0
medinaerik

A proposal has not yet been provided

$20 USD en 7 días
(0 comentarios)
0.0