Find Jobs
Hire Freelancers

C programs

$10-20 USD

Ολοκληρώθηκε
Αναρτήθηκε πάνω από 8 χρόνια πριν

$10-20 USD

Πληρωμή κατά την παράδοση
Please give the Source Code for the following programs: 1. The Collatz conjecture concerns what happen when we take any positive integer n and apply the following condition:- if the entered value " n" is even then, n=n/2 (or) if the entered value "n" is odd then, n=3*n+1 Write a C program using fork() system call that generates the sequence in the child process. The starting number will be provided from the command line. For example if 35 is entered, the sequence must be 35, 106,53,160,80,40,20,10,5,16,8,4,2,1. Because the parent and child process have their own copies of data, it will be necessary for the child to output the sequence. Have the parent invoke the wait() call to wait for the child process to complete before exiting the program. A positive integer must be passed form the parameter. 2. In the previous question, the child process must output the sequence of numbers generated form the algorithm specified by the Collatz conjecture because the parent and child have their own copies of the data. Another approach to designing this program is to establish a shared memory object between the parent and child process. This technique allows the child to write the contents of the sequence to the shared memory [login to view URL] parent can then output the sequence when the child completes. Because the memory is shared, any changes the child makes will be reflected in the parent process as well. This program will be structured using the shared memory technique. The parent process will progress through the following steps: a. Establish the shared memory object (shm open(), ftruncate(), and mmap()) b. create the child process and wait for it to terminate. c. Output the contents of shared memory. d. Remove the shared memory object. In this exercise, the parent and child processes must be coordinate so that the parent does not output the sequence until the child finishes execution. These two process will be synchronized using the wait() system call: the parent process will invoke(), which will suspend it until the child process exits. In summary, child will create shared memory and the output is entered into it and the parent will access this data and displays. 3. Write a multi threaded program that calculates various statistical values for a list of numbers. This program will be passed a series of numbers on the command line and will then create three separate worker threads. One thread will determine the average of the numbers, the second will determine the maximum value and the third will determine the minimum value. For example if the passed integers are:- 90, 81, 78, 95,79,72,85 then the output will report as The average value is 82 The minimum value is 72 The maximum value is 95 The variables representing the average, minimum and maximum values will be stored globally. The worker threads will set these values and the parent thread will output the values once the worker have exited. 4. Write a multi thread program that generates the Fibonacci Sequence. This program works as : On the command line, the user will enter the number of Fibonacci numbers that the program is to generate . The program will then create a separate thread that will generate the Fibonacci numbers, placing the sequence in data that can be shared by the threads (an array is probably the most convenient data structure). When the thread finishes execution, the parent thread will output the sequence generated by the child thread. Because the parent thread cannot begin outputting the Fibonacci sequence until the child thread finishes, the parent thread will have to wait for the child thread to finish. For eg:- If we provide input as 6 then we need to get 6 values which means 0,1,2,3,5,8
Ταυτότητα εργασίας: 8601479

Σχετικά με την εργασία

16 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 9 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
Dear, I have done work on this and can give you task as early as you need. Regards, Jawwad
$30 USD σε 1 ημέρα
3,2 (1 αξιολόγηση)
0,6
0,6
16 freelancers δίνουν μια μέση προσφορά $55 USD για αυτή τη δουλειά
Avatar Χρήστη
Hello I'm interesting your project very well I'm a Good C/C++, Math, Algorithm expert. I understand your req exactly. I m quite well experienced in these jobs. Let's go ahead with me I want to service for you continously. Thanks
$55 USD σε 1 ημέρα
4,9 (422 αξιολογήσεις)
8,4
8,4
Avatar Χρήστη
A proposal has not yet been provided
$39 USD σε 1 ημέρα
5,0 (32 αξιολογήσεις)
5,2
5,2
Avatar Χρήστη
Hello, I have 30 years experience programming in C. I can use multi-programming (using forks or threads) and shared memory for these exercises. A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$160 USD σε 3 ημέρες
4,8 (65 αξιολογήσεις)
5,1
5,1
Avatar Χρήστη
La propuesta todavía no ha sido proveída
$66 USD σε 1 ημέρα
5,0 (9 αξιολογήσεις)
4,6
4,6
Avatar Χρήστη
A proposal has not yet been provided
$45 USD σε 3 ημέρες
4,7 (18 αξιολογήσεις)
4,9
4,9
Avatar Χρήστη
Hello. More 20 years programming experience. I need more details to set real time and price. Regards. ---------------------------------------------------------------------------------------------------------------------------------------------------
$100 USD σε 3 ημέρες
4,8 (12 αξιολογήσεις)
4,4
4,4
Avatar Χρήστη
Hi.I am a Software Engineer and programmer. I have about 2 years of programming experience and developed 52 project .Project are both web based and desktop based application. I am ready to start your project right now. If you have any questions you may ask .Thankx
$50 USD σε 1 ημέρα
4,7 (4 αξιολογήσεις)
3,1
3,1
Avatar Χρήστη
A proposal has not yet been provided
$77 USD σε 1 ημέρα
5,0 (2 αξιολογήσεις)
1,4
1,4
Avatar Χρήστη
A proposal has not yet been provided
$55 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
I recently graduated from Middle East Technical University, NCC, with my 100% ÖSYM Schoolarship, B.Sc. degree in Computer Engineering (June, 2015). Moreover, I am a software engineer who loves trying different things. Currently, I'm developping some mobile apps to sharpen my skills and gain more experience on technology world. I will gladly consider offers in industry about Software Design&Development.
$66 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
Propunerea nu a fost încă furnizată
$30 USD σε 3 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
Hi Dear I can do this c prrogram I have experience with large code base for big projects And I will assure you that I will delivered the work you requested with high quality and reliability and I will explain to you my approach to achieve the programming tasks Feel free to contact me
$10 USD σε 5 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
A proposal has not yet been provided
$20 USD σε 2 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
A proposal has not yet been provided
$20 USD σε 1 ημέρα
0,0 (0 αξιολογήσεις)
0,0
0,0
Avatar Χρήστη
Hello, I am a hardcore c++ developer from last more than 6 years. i am interested in your project. Please reply me asap. Thanks, Jitendra
$55 USD σε 3 ημέρες
0,0 (0 αξιολογήσεις)
0,0
0,0

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Lees Summit, United States
3,6
1
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Αυγ 24, 2015

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.