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)
- 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
- 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
No. of Random Points | Image | Avgerage value of pi of 5 simulations done using solution for 4.24 problem |
---|---|---|
10,000 | 3.1234 | |
100,000 | 3.1399 | |
1,000,000 | 3.1428 |