assignment, Operating System

You must use fork and pipe to complete this project.

This project creates processes to add all numbers in a file. The user will enter a number (1, 2, or 4) of parallel processes to create for processing the numbers. The system will then create this many processes, evenly dividing the file contents between the processes. For example, if the file has 1000 numbers and the user wants 4 processes, then each process would process 250 numbers in the file.

III. System Description

The system is illustrated in the diagram shown below. The processes are as follows:
1. Parent process. This process allows user to input the number of processes to create (1, 2, or 4). It determines what portion of the file each process must work on and informs the process via a pipe. It then waits for each child to report its result. Once each result is received, it combines the results prints the overall result.
2. Child process. Receive which part of the file to process. Process the file and send results back to the parent process.
Posted Date: 10/1/2012 8:24:08 PM | Location : United States







Related Discussions:- assignment, Assignment Help, Ask Question on assignment, Get Answer, Expert's Help, assignment Discussions

Write discussion on assignment
Your posts are moderated
Related Questions

Determine the equation for the y and truth table for the circuits

People arrive at a barber shop at the rate of one every 4.5 minutes. If the shop is full (it can hold five people altogether), 30% of the potential customers leave and come back i

Synchronization In communication among processes messages passed may be blocking or nonblocking - also called as synchronous and asynchronous. Blocking send : The sending pr

What are the three main activities of an operating system in regard to secondary-storage management? a) Free-space management. b) Storage allocation. c) Disk scheduling.

What are the different ways in which a thread can be cancelled? Cancellation of a target thread may happen in two different scenarios: Asynchronous cancellation: One thr

please help us to write a code in c for tree directory structures.

why we say " OS is a resource allocator" and “OS is a control program"?

Program of Calculator and Controller with the fork, exec, and wait system calls The objective of this assignment is to get you to be comfortable with the fork(), exec(), and wai

what is deadlock