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
Direct memory access Many computers avoid burdening the main CPU with programmed I/O by offloading sine if this work to a special-purpose processor known as a direct memory add

1. How is reliability enhanced with the microkernel approach to system design?  2. In a virtual machine design where guest operating systems are independent virtual machines sup

Vyvtvtn8

Find the optimal solution and optimal value of the following linear program. Use both (a) the enumerating the corner points method and (b) the iso-profit line method. Also identify

There is a process bloacked by a semaphore and no other process in the ready queue, can the blocked process get back to the ready queue without the semsignal() function?

Purpose This is intended to help you develop your understanding of shell scripting in both a Windows and Unix environment. Deliverables For both the first and second op

Explain Threads for Executing Concurrent Application Code The thread has been introduced in many operating systems as an efficient mechanism for executing concurrent applicatio

Explain the various types of computer systems. Mainframe systems Large Number of CPU with Greatest Processing Power:  Huge Memory Capacity:  Increased Performance by s

Buffering Messages exchanged by communication processes reside in a impermanent queue. Such a queue can be executed in three ways. Zero capacity: The queue length is 0.

Q. Why do several systems store the operating system in firm ware and others on disk? Answer: For certain devices such like handheld PDAs and cellular telephones a disk with