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
Processes have valid and invalid entries on their page tables. The valid entries all point to some where "real" (e.g. a physical page, or some portion of disk in case of non-reside

importance of Operating system in modern computers. Also explain various functions & types of operating systems

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

Q. Why do some systems stay track of the type of a file while others leave it to the user or simply don't implement multiple file types? Which system is "better?" Answer: A f

What are the system components of an operating system and explain them? a) Process management b) Main-memory management c) I/O management d) File management e) Seco

Define thrashing. Thrashing is the accident of high page traffic and low CPU utilization. It is observed that the cause of thrashing is an under-commitment of memory to program

Determine the reasons for Poor response time Process busy or High I/O rates or High paging rates

Briefly explain about file system implementation? Several on-disk and in-memory structures are used to execute a file system. On disk, the file system may have information abou

Contiguous allocation The contiguous-allocation method needs each file to occupy a set of contiguous blocks of the disk. Disk addresses explain a linear ordering on the disk. T