Find Jobs
Hire Freelancers

C++ Program

$10-30 USD

Concluído
Publicado há quase 10 anos

$10-30 USD

Pago na entrega
You may choose one of them to work on. Please Find the attachments. Output should be in the same way as in scanned copies attached. Also attached Basic structure for both the programs. (1) Write a program in C++ to implement the bounded-buffer problem shown in class. The circular buffer pool has 10 buffers (0..9) in it which are accessed concurrently by 2 producers and 1 consumer. You should use 2 condition variables and two critical sections for the 2 types of threads. You should also implement the functions put() and get() shown in class for the producers and consumer, respectively. The items produced by the producer threads should be generated using a random number generator. You should also delay the two producers and the consumer by 1 second, 3 seconds, and 2 seconds, respectively, each time an item is deposited into or retrieved from the buffer pool. Refer to the handout distributed in class to get an idea of what need be generated from your program. (2) Write a program in C++ to synchronize two threads that both can increment “counter” concurrently. You should implement the functions sem_init(), sem_wait(), and sem_post() shown in Fig. 31.12 using a condition variable. The two threads are synchronized using sem_wait() and sem_post to increment “counter”. Refer to the handout distributed in class to get an idea of what need be generated from your program. Use the following criteria to prepare and turn your programs in. Submit ONLY your source code file(.cpp)
ID do Projeto: 5844593

Sobre o projeto

3 propostas
Projeto remoto
Ativo há 10 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
Hello, sir I considered your requirement. And I have some experiences like your project. I want you to discuss it more details. Regards, zong
$30 USD em 1 dia
5,0 (1 avaliação)
1,5
1,5
3 freelancers estão ofertando em média $47 USD for esse trabalho
Avatar do Usuário
Hi, I am a graduate in CS and working as a C++ programmer for 4+ years. I have done lots of assignments both in academic courses and in freelancer.com implementing circular buffer for generic types. Also I implemented producer/consumer, reader/writer and dining philosopher problem for multithread. I assure you of clean, efficient code with proper comment and documentation. thanks
$77 USD em 1 dia
4,4 (23 avaliações)
4,9
4,9
Avatar do Usuário
Hi, dear. And I am a freelancer had many good experiences like your project. So Please contact me, any message. Wait for your response.
$50 USD em 1 dia
4,2 (9 avaliações)
3,0
3,0
Avatar do Usuário
A proposal has not yet been provided
$35 USD em 5 dias
5,0 (1 avaliação)
1,1
1,1

Sobre o cliente

Bandeira do(a) UNITED STATES
Chicago, United States
5,0
1
Método de pagamento verificado
Membro desde abr. 23, 2014

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.