Write a program that creates a hierarchy of processes using

Assignment Help Application Programming
Reference no: EM13347608

Write a program that creates a hierarchy of processes using the fork() system call. The initial program termed the root, along with all its o springs will ultimately form a full binary tree. The tree has both internal and leaf-level nodes.

The basic objective of the tree is to help sort the content of a (potentially very large) data le consisting of taxpayer records. This is done in a \divide-and-conquer" style: the leaf-level nodes are responsible for sorting portions of the data le, while the internal nodes help merge partially ordered data and present their combined outcome to their parent and ultimately to the root.

The leaf level nodes use diverse independent programs to sort the portion of the input data le they are assigned to. The required data communication between consecutive levels of processes takes place with the help of named-pipes (FIFOs).

In the context of this project, you will:

Create a hierarchy of processes using fork(),  allow the execution of various executables (or di erent pieces of code) by the nodes of the hierarchy, use a number of useful system calls including fork(), exec*(), read(), write(), mk fo(), wait(), poll(), etc.

The Process Hierarchy:

Figure 1 depicts a sample process hierarchy your program may generate. The overall goal of the hierarchy is to create a sorted listing of all data records based on a user-provided condition; records are provided to the root in the form of a data le (binary/text). There are three types of nodes that try to accomplish di erent types of tasks. In particular:

1. root node: this is your program and functions as the \anchor" for the entire hierarchy; more importantly, it orchestrates of the entire sorting operation.

1367_Hierarchy of processes using the fork system.png

At rst, it creates a single splitter/merger node and the root passes to this node {named sm0{ the range of records whose sorting is to oversee (i.e., the entire range). The depth of the tree (and consequently the number of levels internal nodes can be found) is designated by a parameter at the command line of your program (root).

2. sort nodes: each of these leaf-level nodes is provided with a set of records (possibly in the form of a le name/descriptor, as well as the range of the records in the le) that it will have to sort. To achieve their goal, sorters deploy di erent programs and return to their parent their outcome in the form of a named-pipe (FIFO queue).

Four di erent programs are used to do sorting at leaf-level, namely:

(a) Shell-Sort (SH): you have to write this independent program

(b) Quick-Sort (QS): you have to write this independent program

(c) sort (SO): the Unix system program

(d) Buble-Sort (BS): you have to write this independent program

Reference no: EM13347608

Questions Cloud

The sunshine tomato soup shippers gives tomato soup at : the sunshine tomato soup shippers gives tomato soup at three west coast canneries in bakersfield eugene and phoenix.
1 darren corporation had net income of 250000 and paid : 1. darren corporation had net income of 250000 and paid dividends of 50000 to common stockholders and 10000 to
A shop is selling laptops at regular price and at half : a shop is selling laptops at regular price and at half price. if the laptops are regular price a day they can be at
In this assignment you have to implement and test a public : in this assignment you have to implement and test a public transport fare ticketing system. you will need to
Write a program that creates a hierarchy of processes using : write a program that creates a hierarchy of processes using the fork system call. the initial program termed the root
Case study electron control inc sells voltage regulators to : case study electron control inc. sells voltage regulators to other manufacturers who then customize and distribute the
Write a report on business competitors you have to select : write a report on business competitors. you have to select major business competitors pizza hut and mcdonalds to
Ethical dilemmawhats an expenseseveral years ago wilson : ethical dilemmawhats an expense?several years ago wilson blowhard founded a communications company. the company became
You are to reflect on how this case of china sky relates to : you are to reflect on how this case of china sky relates to what the arguments for and against allowing audit firm

Reviews

Write a Review

Application Programming Questions & Answers

  The increasing need to travel and lifestyle changes of

the increasing need to travel and lifestyle changes of society has made airlines industry one of the most demanded and

  Produce a project plan and an interim description of the

produce a project plan and an interim description of the project developmentproblem 1. northern lights alert service.

  Rtl sa is a company which develops bespoke solutions for

rtl sa is a company which develops bespoke solutions for the rubber industry. they produce both rubber compound which

  Memory managementwrite a paper to provide depth knowledge

memory managementwrite a paper to provide depth knowledge of how memory is used in executing your programs and its

  Hubspot is currently at a crossroads with management

hubspot is currently at a crossroads with management looking for rapid acceleration of sales and profits. in their

  Questions on programing problem step 1 we ask you to

questions on programing problem step 1 we ask you to produce a project plan and an interim description of the project

  Hypertext markup languagethe basics of hypertext markup

hypertext markup languagethe basics of hypertext markup language and world wide web. first you will learn about

  Basic requirementsscreen one has three edittext views and

basic requirementsscreen one has three edittext views and one button.the edittext views allow you to enter a students

  Electricity modellingit deals with electricity usage data

electricity modellingit deals with electricity usage data for 241 households in new zealand that was collected in

  Problem descriptionyou are working as an engineer for a

problem descriptionyou are working as an engineer for a materials manufacturing research lab and have been asked to

  Discussion htmlcssjavascript placementnbspplease respond to

discussion htmlcssjavascript placementnbspplease respond to the followingcompare and contrast the process of adding

  In this project you will create an application to run in

in this project you will create an application to run in the amazon ec2 service and you will also create a client that

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