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

  How many page faults are generated using lru replacement

How many page faults are generated by the following arrayinitialization loops, using LRU replacement, and assuming page frame 1 has the process in it, and the other two are initially empty.

  Estimate maximum aggregate i/o transfer rate

A 32-bit computer has two selector channels and one multiplexor channel. Each selector channel supports two magnetic disk and two magnetic tape units.

  Explain the difference between the chkdsk and scandisk cmnds

Explain the difference between the Copy command and the Xcopy command

  Task 1nbspon a fictitious computer of 32 bits paging memory

task 1nbspon a fictitious computer of 32 bits paging memory management system is used to manage its main memory

  Research an operating system or a programming language

Is the threading model based on kernel-level or user-level threads - What is the most significant advantage of the implementation and what is the most significant disadvantage of the implementation?

  Design and implement the removeuser.sh script

Packs all files (not just those in the user's home directory) belonging to into single compressed archive named

  Creating algorithms to print the daily salary

Construct two algorithms to print the daily salary of a worker who, each day, is paid twice the previous day's salary for a thirty day period.

  Differences in windows, mac os, unix, and linux os

Discuss the fundamental differences in Windows, Mac OS, UNIX, and Linux operating systems for personal computers? Determine the unique characteristics do mainframe operating systems have?

  Question about data communications

A 4480 octet datagram is to be transmitted and requires to be fragmented because it will pass through an Ethernet with a maximum payload of 1500 octets.

  Design and implement the disableuser.sh script

disableuser.sh -m : Does not disable login (by the operating system), but changes the user's login shell to a script that just writes the quoted message to standard output and then exits.

  A computer has a cache, main memory, and a disk

A computer has a cache, main memory, and a disk. If a referenced word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache (called cache miss)

  Identify the levels in the file hierarchy

Identify the levels in the file hierarchy and identify the order in which the directories need to be created and identify the commands used for creating the file hierarchy.

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