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

Explain types of file allocation- linked list allocation, Linked list alloc...

Linked list allocation: At this time the blocks are stored using linked lists. The block size require not be the same. Thus internal fragmentation is avoided. Consider

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

What is the use of FIFOs in client-server applications

What are the methods for handling deadlocks, What are the methods for handl...

What are the methods for handling deadlocks? The deadlock problem can be dealt with in one of the three ways: a. Use a protocol to prevent or avoid deadlocks, ensuring that

What is meant by file management systems?, What is meant by file management...

What is meant by file management systems? File Management systems are as well referred to as simply a file system .File system is the system that an OS operating system or prog

Malloc, I need help implementing malloc

I need help implementing malloc

Permanently starves cpu-bound programs, Q. Presume that a scheduling algori...

Q. Presume that a scheduling algorithm at the level of short-term CPU scheduling favours those processes that have used the least processor time in the recent past. Why this algori

Explain the various methods for handling deadlocks, Explain the various met...

Explain the various methods for handling deadlocks.      A set of processes is deadlocked if every process in the set is waiting for an event that only a process in the

What is two-level directory, What is Two-level directory In the two-lev...

What is Two-level directory In the two-level directory structure every user has own user file directory (UFD). When a user jobs begins or a user logs in, the system's master fi

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