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
What is real time system? A real time system has well explained, fixed time constraints. Processing must be done within the explained constraints, or the system will fail. It i

Contiguous allocation: Every file will be allocated contiguous space in the memory. Allow the block size be 1K If a 50K files desires to be allocated space after t

Q. It is occasionally said that tape is a sequential-access medium whereas magnetic disk is a random-access medium. In fact the correctness of a storage device for random access d

1. On every access, mark the page with a timestamp. Whenever we need to evict a page, we search through memory for the oldest page, the least-recently used page. But we need memory

The field that consists of a segment index or an internal index is known as Target datum is field that consists of a segment index or an internal index.

What are the objectives of operating system? Objectives of OS 1.      Convenience: An OS makes a computer more suitable to use. 2.      Efficiency : An OS allows t

Question 3: (a) Fincorp Ltd is an insurance company wishing to change over to a better business system using an improved version of a financial information system (FIS). The direc

The scheduling technique in which CPU is allocated to the process with least CPU-burst time is known as  Shortest job first Scheduling is a scheduling technique in which CPU i

WHAT ARE THE ADVANTAGES AND DISADVANTAGES OF DUAL MODE OPERATION OF OPERATING SYSTEM>?

advantages and disadvantages of monolithic and layered approach