/CS252-OS-Assignment-Monte-Carlo-Sim

Assignment for CS 252 course. Using Multithreaded Programming for finding pi using Monte Carlo Simulation technique

Primary LanguageJupyter NotebookMIT LicenseMIT

CS252-OS-Assignment-Monte-Carlo-Sim

Assignment for CS 252 course

Using Multithreaded Programming for finding pi using Monte Carlo Simulation technique

One of the solutions to the problem statements 4.24 and 7.17 in 10th edition of Operating System Concepts by ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, GREG GAGNE


  • Python version --> 3.7.12

Inspiration for the code is taken from Andew Dotson's YouTube video for calculating π i.e
How to Estimate Pi Numerically in Python (https://www.youtube.com/watch?v=JjfrNc-G-zA&ab_channel=AndrewDotson)

  1. The Google Colab Notebook link to first solution i.e 4.24 problem, in Python is https://colab.research.google.com/drive/16bUo_AEwv2K9GC5_VmitESSZGe84JfVH?usp=sharing
  2. The Google Colab Notebook link to first solution i.e 7.17 problem, in Python is https://colab.research.google.com/drive/1HUVGgs9B77WbO394hXhkcT-Q5vK-8961?usp=sharing

Analysis for different number of random points

No. of Random Points Image Avgerage value of pi of 5 simulations done using solution for 4.24 problem
10,000 alt text 3.1234
100,000 alt text 3.1399
1,000,000 alt text 3.1428