Find Jobs
Hire Freelancers

project

$30-40 USD

Concluído
Publicado há mais de 22 anos

$30-40 USD

Pago na entrega
You may choose to implement your programs eighter in UNIX or Windows (NT/2000) environment. (30 points) Implement a C or C++ program that takes two command line arguments, double values A and B, computes and outputs How many iterations of A = sin(A + sin(B)) are required before the value of A converges to within 10-15. How many iterations of A = cos(A + cos(B)) are required before the value of A converges to within 10-15. a line stating which of the two equations took fewer iterations to converge. you are required to invoke two child processes to solve this problem: one child to calculate (but not print) the number of iterations that the sin formula takes. And then sends that result to the other child process, the other child to calculate and print the number of iterations that the cos formula takes, and receive the result from the first child process, print it, and compare the two values. (So the parent process ends up doing very little, other than settings things up, spawning the child processes, and waiting for them to die.) Use fork to spawn the child processes. You are free to choose the means of communication to pass that value from the first child to the second child. (30 points) Write a program than does the same as part 1, except that you are required use threads rather than fork'ed processes. In addition to the main thread, create two additional threads: one to calculate (but not print) the number of iterations that the sin formula takes. And then make that result available to the other thread, the other to calculate and print the number of iterations that the cos formula takes, and receive the result from the first thread, print it, and compare the two values. (So the main thread ends up doing very little, other than settings things up, spawning the two threads, and waiting for them to die.) Use shared variables as the means of communication between the threads. (Hint: You don't need pipe.) Also, since the two threads are started at the same time, and the second needs to know when the data from the first is available, some form of synchronization is required. You may do this using semaphores. (For example: have the main thread lock the semaphore before it calls the two threads, have the first thread unlock it when the data is ready, and have the second thread lock it as it starts.) (30 points) Implement a solutions for the bounded-buffer producer/consumer problem. Your implementation sh ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. ## Deadline information 12-9-01
ID do Projeto: 2833735

Sobre o projeto

6 propostas
Projeto remoto
Ativo há 22 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
See private message.
$29,75 USD em 14 dias
4,6 (66 avaliações)
5,1
5,1
6 freelancers estão ofertando em média $28 USD for esse trabalho
Avatar do Usuário
See private message.
$34 USD em 14 dias
5,0 (18 avaliações)
6,3
6,3
Avatar do Usuário
See private message.
$34 USD em 14 dias
4,8 (43 avaliações)
5,4
5,4
Avatar do Usuário
See private message.
$25,50 USD em 14 dias
4,8 (16 avaliações)
3,1
3,1
Avatar do Usuário
See private message.
$29,75 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$12,75 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
5,0
2
Membro desde out. 30, 2002

Verificação do Cliente

Outros trabalhos deste cliente

project 3
$30-5000 USD
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.