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
NEXT FIT ALGORITHM Here scanning starts from the first fit position and then it finds the next position which is large sufficient to hold the process. Thus the name next fit.

How can a user program disturb the normal operation of the system? a) Issuing illegal I/O operation. b) By accessing memory locations within the OS itself. c) Refusing to

DESIGN GOALS OF WINDOWS XP.DESCRIBE IN DETAIL.

Q. The instance of handshaking used 2 bits: a busy bit as well as a command-ready bit. Is it probable to implement this handshaking with only 1 bit? If it is illustrate the protoc

Before proceeding with its execution, every process must obtain all the resources it needs is called Hold and wait

single pass assembler

Q. Multithreading is a commonly utilized programming technique. Illustrate three different ways that threads could be implemented. Describe how these ways compare to the Linux clon

What are the main advantages of the microkernel approach to system design? Benefits typically contain the following  (a) Adding a new service does not require modifying the

Q. What are two dreadful problems that designers should solve to implement a network-transparent system? Answer: One such issue is making all the processors as well as storag

What are the typical elements of a process image? User data: Modifiable part of user space. May have program data, user stack area, and programs that might be modified. User