Perform necessary error checking to ensure that a positive

Assignment Help Operating System
Reference no: EM13312311

3.21 The Collatz conjecture concerns what happens when we take any positive integer n and apply the following algorithm: 

n = n/2, if n is even 3 × n + 1, if n is odd The conjecture states that when this algorithm is continually applied, all positive integers will eventually reach 1. For example, if n = 35, the sequence is 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1 

 , if 8 is passed as a parameter on the command line, the child process will output 8, 4, 2, 1. Because the parent and child processes have their own copies of the 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. Perform necessary error checking to ensure that a positive integer is passed on the command line.

Reference no: EM13312311

Questions Cloud

Explain how to estimate the diameter of the small pipe : Fluid flows steadily, at a volume rate Q, through a large pipe and then divides into two small pipes, the larger of which has an inside diameter of 25 mm and carries three times the flow of the smaller pipe.
Explain how many of the potential alkyl halide products : A variety of different products could be formed in this reaction; for this problem assume all unique products are formed that only 1 Br is present in each alkyl halide product. how many of the potential alkyl halide products would have at least on..
Compute the magnitude of the load changes in length : A brass alloy has a yield strength of 280 MPa, a tensile strength of 390 MPa, and an elastic modulus of 105 GPa. A cylindrical specimen of this alloy 12.7 mm in diameter and 250 mm long is stressed in tension and found to elongate 7.6 mm
Determine what is the final weight in pounds and newtons : A container weights 2.06lb. It is filled with 1.09ft^3 of water at 25 degrees Cel. What is the final weight in pounds and newtons
Perform necessary error checking to ensure that a positive : Write a C program using the fork() system call that generates this sequence in the child process. The starting number will be provided from the command line. For example
Find the maximum height of the ball above the ground : You throw a 5-kg ball from a platform releasing the ball at a height of 5 meters with a speed of 10m/s at an angle of 30 degrees with respect to the horixontal. Find the maximum height of the ball above the ground
Determine the deflection in degree for horizontal wind speed : Determine the deflection in degrees for horizontal wind speed of 10m/s and what is the magnitude of the force required at the bottom of the sign to prevent the sign from deflecting
Iso standards apply to riordan manufacturing : Identify which ISO standards apply to Riordan Manufacturing
What will be the new angular velocity : Your 70kg friend is standing on the outer edge of a merry go round with moment of inertia 695kg*m^2, what will be the new angular velocity

Reviews

Write a Review

Operating System Questions & Answers

  Determine the largest value

A soft real time system has 4-periodic events with periods of 50, 100, 200 and 250 msec each. Assume 4-events need 35, 20, 10 and X msec of CPU time, respectively.

  Networking based question

Determine some of the factors other then the network itself that can cause the network to seem slow?

  Relational database architecture from a network

Determine what would make a corporation or organization migrate to a relational database architecture from a network or hierarchical architecture?

  Match the os mechanisms on the left to the hardware support

Match the OS mechanisms on the left to the hardware support specific for each mechanism on the right.

  What is structured programming

What does it mean to say that a programming language is machine independent and name and describe four different programming paradigms.

  Multiple choice - system analysis and design

The primary benefits of the Waterfall Development methodology is needs are completely specified and held relatively constant prior to programming.

  Solving hub issue

Linda has been asked the job of connecting 5-computers to a network. The room holding 5-computers has 3-network ports that connect to a hub in an electrical closet down the hallway.

  Explain deadlock-avoidance system

What is the difference between a safe state and an unsafe state in a deadlock-avoidance system?

  A lock variable not a good solution for mutual exclusion

why is busy waiting on a lock variable not a good solution for mutual exclusion?

  Creating the sample database

nstall DB2 Express-C, construct the model database, and validate the installation and write a short paper describing your experience with the installation.

  Comparison of 3 mobile operating systems in user interface

comparison of three mobile operating systems in terms of user interface, functionality, application support and platform presence.

  What would you do to influence procurement process-platform

What would you do to influence the procurement process for both platforms (hardware & OS, such as desktops, laptops, servers, etc.) and application software?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd