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
what is the need-to-know principle? why is it important for a protection system to adhere to this principle?

What are the objectives for a file management system? To meet the data management wants and requirements of the user, which embrace storage of data and the ability to

SEGMENTATION In a memory management system that is properly a programmer views a program to be collection of program components called as segments . Every segment is a logical

Long term scheduler calculates which processes are admitted to the machine for processing. It accepts the degree of multiprogramming. Once accepted, a job converts a process.

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Q. Catalogue the design goals of Windows XP. Answer: Design goals comprise security and reliability and Windows and POSIX application compatibility with high performance and ex

What is sector sparing? Low-level formatting also sets aside extra sectors not visible to the operating system. The controller can be told to change each bad sector logically w

Operating Systems 1. Explain single Partition Allocation and Multiple Partition Allocation. 2. What do you mean by PCB? What useful information is available in PCB? 3. De

Q. Timers could be utilized to compute the current time. Provide a little description of how this could be accomplished. Answer: A program could utilize the following ap

Convert the following from hex to binary and draw it on the memory map.     RAM    = 0000 -> 00FF     EPROM = FF00  -> FFFF Answer:   0000  0000 0000  0000 (0)    RAM sta