Unix system programming

Assignment Help Operating System
Reference no: EM131608418

Exercise: UNIX system programming

Learning objectives

1. Grok POSIX threads

2. Grok thread synchronization using mutexes & condition variables

3. Simple system administration tasks on UNIX

4. Experience some parallel algorithms implementation

Cover Story -

In this exercise, you will build your own thread pool manager. The system will be composed of three main components:

1) Thread Pool Manager - Responsible of distributing tasks amongst its available threads

2) Task Feeder - Responsible of loading new tasks into the Thread Pool Manager (Bonus)

3) Main application - The main application (thread) is responsible for approximating PI using the Monte-Carlo method.

Exercise 1 - Thread Pool Manager

The thread pool manager has N available threads (N is given as a parameter to the program). The thread pool manager always waits for new tasks (separate thread) to be added by the Task Feeder (Bonus) or simply by assigning it tasks from main. These tasks should then be distributed between the available worker threads.

Note that the tasks are completely oblivious to the thread pool manager.

Exercise 2 - Main Application

The main application is responsible for approximating PI using the Monte-Carlo method.

1) The main application receives as a parameter the number of iterations to be done by the Monte-Carlo method to estimate PI.

2) The main application is the only component familiar with the calculation.

3) The main application must define a set of tasks (Divide and Conquer) to be handed to the Task Feeder (Bonus) or simply hands it to the Thread Pool Manager by itself. Each task is responsible for solving its relative part of the PI approximation calculation.

The main application needs to combine the sub-solutions to an overall solution.

Exercise 3 -Task Feeder

The main application, the only one familiar with the actual "work", defines a set of tasks to be handed to the Task Feeder. The task feeder is then responsible to load these tasks to the Thread Pool Manager.

Attachment:- Assignment File.rar

Reference no: EM131608418

Questions Cloud

Calculate and print the total of yesterday receipts : (Parking Charges) A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $0.50 per hour for each hour.
What are two ratios that measure liquidity : What are two ratios that measure liquidity? What is the primary difference between financial statement analysis and operational analysis?
Windows standards for menus : Discuss the benefits of following Windows standards for menus, positioning of buttons, colors, etc. Answers might include user familiarity and comfort
Describe how race and gender shape a persons life : Thinking about these ideas, describe how race and gender shape a person's life. Which is most powerful in a person's life: race, gender, or class?
Unix system programming : Exercise: UNIX system programming. In this exercise, you will build your own thread pool manager
Calculate the cost of debt capital : Calculate the cost of debt capital? Calculate the cost of debt capital for 2018.
Describe the task or service the gadget will perform : Describe the task or service the gadget will perform.Give it a name. Explain what it looks like - color, size, and shape.What materials is it made of?
Discuss job search and performance on the job : address networking, continuing education, job search and performance on the job.
Cascading style sheet : Deliverables: One (1) Web page and one (1) Cascading Style Sheet (.css), including the image file.

Reviews

len1608418

8/22/2017 3:04:59 AM

Please try the POSIX threads examples given in the lecture before starting this exercise. Please try at least one example with mutexes & condition-variables before starting this exercise. Please send the compiling project in 1 ZIP or tarred gzipped file containing only. The zip file name should be your "your ID number" i.e. a filename should be 0123456789.tgz or 9876543210.zip Do not submit RAR or 7z etc. Please ensure your project compiles with make all instruction. Please ensure make clean deletes your binary and any cruft. Please add any additional instructions and comments to README.TXT file. You need to implement this exercise on your own. You are allowed idea exchange ideas with your fellow students but not to exchange code. You are allowed to use web resources though. If you use any code you found on the Internet SPECIFY that in the README.TXT file. If two students submit identical work a disciplinary action will be taken. (Even if both copied the same source from the net)

Write a Review

Operating System Questions & Answers

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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