assignment, Operating System

Assignment Help:
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.

Related Discussions:- assignment

Protection scheme in unix, Q. Consider a system that holds 5000 users. Pre...

Q. Consider a system that holds 5000 users. Presume that you want to allow 4990 of these users to be able to access one file. a. How would you denote this protection scheme in

Semaphore, mention the three problems that mat be caused by wrong initializ...

mention the three problems that mat be caused by wrong initialization and placement of wait() and signal()operations in the use of semaphore

What are the different methods for handling deadlocks?, What are the differ...

What are the different methods for handling deadlocks? Deadlock detection and recovery: Permit the system to enter a deadlock state, detect it and after that rec

Demand-paging system, Consider a demand-paging system with the following ti...

Consider a demand-paging system with the following time-measured utilizations: CPU utilization: 10%, Paging disk: 98%, Other I/O devices: 5%. What does this imply? How to improv

System call, how the system call is work?

how the system call is work?

What is the basic function of assembler, Q. What is the basic function of A...

Q. What is the basic function of Assembler ? Input to an assembler is an assembly language program. Output is an object program and information which enables the loader to prep

Explain rehashing to handle collision, Explain Rehashing to Handle Collisio...

Explain Rehashing to Handle Collision Rehashing:  Re-hashing schemes make use of a second hashing operation while there is a collision. If there is an additional collision, we

Ipc, Explain in detail about ipc in linux

Explain in detail about ipc in linux

Operating system.., What is the use of FIFOs in client-server applications

What is the use of FIFOs in client-server applications

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd