ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 28 Apr 2017 My Price 9.00

Use a Mutex variable to lock the critical section

  1. 1.To calculate the value of Pi,    we can use the graph of a circle and find the area under the graph.
  2. 2.Riemann sum(https://en.wikipedia.org/wiki/Riemann_sum )is an effective method for finding the area under the graph
  3. 3. Write a PThreads Program that will calculate Pi
    1.      -It should run 8 threads
    2.      -Create a global variable for the total sum 
    3.      -Use a Mutex variable to lock the critical section where you sum the results
  4. 4.The program should output the sum at each thread and the parent will output the total sum
  5. 5.Copy this version and remove the Mutex variable
    1.      -run both versions and compare the output
  6. Need
    1. 1.Source Code
    2. 2.Screenshots of output of both programs

Some sample code for PThreads can be found here. https://grid.cs.gsu.edu/~cfrederick/csc4320/examples.php

Answers

(11)
Status NEW Posted 28 Apr 2017 06:04 AM My Price 9.00

-----------

Not Rated(0)