{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


F10_threadsassignment1 - Interprocess Communications in...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 7103 Advanced Operating Systems Assignment 2 Due Date: 2 weeks The purpose of this assignment is to introduce students to concurrent programming and interprocess communication in Unix. Before you begin the assignment. 1. Get yourself used to basic UNIX commands like ls, cd, rm, mkdir, cp, ren, man, set, setenv etc., one UNIX editor like vi or emacs and the UNIX C or C++ compiler like cc or g++. If you need a book, you may use the well-known A Practical Guide to the UNIX System by Mark G. Sobell (Addison-Wesley). 2. For other parts of the assignment you will need some material describing UNIX/AIX system calls for process/thread management. However, I assume that you are familiar to concurrent processes (in particular, fork() , exec() and pipe() ). If you a re not, again you are free to use any book of your choice. I’ll suggest
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Interprocess Communications in UNIX by John S. Grey (Prentice-Hall) for this purpose. Do the following: 1) Write a program to approximate the value of by numerically integrating 4/(1+x 2 ) over the range 0 to 1 using trapezoid rule. Divide the range [0,1] in 200 intervals. Do the computations over each interval using a kernel level thread and add the results to obtain the approximate value of . The trapezoid rule for integrating a function ( f ( x )) works as follows. The range is divided into small intervals of equal width. Over each interval ( a,b ), the area under the curve is estimated using the formula ( b-a )( f ( a )+ f ( b ))/2. All the areas thus obtained added to obtain the value of the integral. Such a method of computation is useful for computing in a multiprocessor shared memory system....
View Full Document

{[ snackBarMessage ]}