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
An operating system involves 3 user processes each one requiring 2 units of resource R .The minimum number of units of R like no deadlocks will ever take place is The minimum

Ask question Project Details PROJECT OVERVIEW The ABC Hospital is upgrading their version of Windows. As part of the upgrade, 100 new computers will be purchased. Your task is to

Q. Which of the subsequent instructions should be privileged? a) Read the clock b) Clear memory c) Set value of timer d) Issue a trap instruction e) Turn off interr

Q. Show that a few schedules are possible under the two-phase locking protocol however not possible under the timestamp protocol and vice versa. Answer: A schedule that is auth

Facilities of a Debug Monitor Facilities of a debug monitor are like this: Setting breakpoints in the program Initiating a debug conversation while control reaches

What is the use of multiprogramming on individual processors ? In the usual multiprocessor, which is dealing with independent or coarse-grained synchronization granularity, it i

Entry-sequenced file organization The records in an entry-sequenced file are store up in the order they are written into the file. New records are for all time appended to

Problem: a) Define a ‘file' and list the objectives of the file management system. b) List the ways in which programs access files and determine for what file types you woul

What is meant by context switch? Switching the CPU to another process needs saving the state of the old process and loading the saved state for the latest process. This task is

Question: a) The Dynamic Host Control Protocol (DHCP) server is important for setting TCP/IP configuration, when there are a large number of clients on the network. How does D