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
Pure and impure interpreters      In a pure interpreter, the source program is maintained in the source form throughout its interpretation. This arrangement acquires substantia


Q. Consider a calculating environment where a process is given the privilege of accessing object only n times. Suggest a scheme for implementing this policy. Answer: Add an i

Explain Processing Predefined Application Protocols Implementing and swift processing of predefined application protocols is sure to improve performance of server - side applic

What is external fragmentation? As process are removed from and loaded to the memory free memory space is bracken into pieces .external fragmentation take place when enough mem

i need the job to be done within 3days

Extend task 1 so that the requests are issued by the clients instead of the server. The server now do not use the "all_requests.dat" file. Instead every client thread reads from

Define busy waiting and spinlock. When a process is in its significant section, any other process that tries to enter its critical section must loop continuously in the entry c

What is indexed allocation? Every file has its own block of pointers to the sectors of the file.

What are scheduling queues? Since the processes enter the system they are put into job queue. This queue contains all processes in the system. The processes that are exist in m