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
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

Define the OS/2 threads code The sample program in Listing is very similar to the NetWare example. OS/2 commands are substituted for the pseudocode commands controlling thread

Gopher Gallery consists of a shopping mall and a cart ride that coversĀ  the 150 acre habitat. There are m visitors and n single-person vehicles. VisitorsĀ  stroll around the mall at

Question: (a) Explain the similarities and differences between two different threads running in the same process and two independent processes. When would you want to use two t


Tree structured directories: This is the main common directory structure. The tree has a root directory as well as every file in the system has a unique path name. A directory

Determine a parser which is a variant of top-down parsing without backtracking Recursive Descend parser is a variant of top-down parsing without backtracking.

What is the hardware support required to implement paging? Each operating system has its own techniques for storing page tables. The majority allocates a page table for each pr

Consider a large web-based database. In some sense, Google is sort of like this. There might be many users who want to read from the database, but only a few users who are allowed

Q. State three merits of placing functionality in a device controller rather than in the kernel and State three disadvantages. Answer: Three advantages: Bugs are less probabl