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
Explain the OS/2 Operating System Like NetWare, OS/2 manage resources at three levels, as shown in Figure 4.5 Resources may be maintained at the session, process, and thread le

what do obelia eat and how do they feed

For reading, most operating systems use demand paging. This means that pages are only read from the disk into physical memory when they are needed. In the page table, there is a re

Medium term scheduling is form of the swapping operation. This attaches to processes that are in a suspended or blocked state. They are swapped out of real-memory storage until t

Write a short note on disk structure Modern disk drives are initiate as large one dimensional array of logical blocks where the logical block is the smallest unit of transfer.

Determine what the “blocking factor” of a file is Blocking factor is the number of logical records in one physical record

What is ERD? Entity Relationship Diagram is the graphical representation of the object relationship pair. It is mostly used in database applications.

Q. What protection problems may occur if a shared stack is used for parameter passing? Answer: The contents of the stack could be conciliation by other process(es) sharing th

Unix process API The two most important function calls to use when programming with several processes are fork and exec:  fork() creates a copy of current process. It gives

Explain the ThreadSwitch function used in the netware Since NetWare 3 and 4 are nonpreemptive environments, it may be necessary for the application developer to explicitly reli