From 08fc175f8a5fe59e23e3c307bf5f3c7c9301bc3e Mon Sep 17 00:00:00 2001 From: RenatusRS Date: Wed, 11 Oct 2023 15:17:58 +0200 Subject: [PATCH 1/4] Create README.md --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ee642f --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# Open Network Simulation + +> Project for **Computer Systems Performance** / **Performanse Računarskih Sistema** class. + +## Introduction + +This project, implemented in Python, models a multiprogramming computer system via an open network operating in a steady-state regime. The simulated system consists of a processor, three system disks, and 𝐾 user disks, with jobs arriving at the processor following a Poisson process with intensity 𝛼. The system operates on exponential processing and service times with respective averages of 𝑆𝑝 = 6.25π‘šπ‘  for the processor, 𝑆𝑑1 = 10π‘šπ‘  for the first system disk, 𝑆𝑑2 = 𝑆𝑑3 = 15π‘šπ‘  for the second and third system disks, and π‘†π‘‘π‘˜ = 25π‘šπ‘  for user disks. + +The project facilitates the analytical evaluation and simulation of the system, determining the utilization of resources, flows through resources, average number of jobs at each resource, and the system's response time with a central server for varying numbers of user disks (𝐾) and input flow intensities (π‘Ÿ β‹… π›Όπ‘šπ‘Žπ‘₯, π‘Ÿ ∈ {0.25,0.50,0.77, 0.99}). It identifies the critical resource in the system and provides a detailed comparison between the analytical and simulated results. + +## Features + +- **Analytical Evaluation:** The project offers a robust analytical evaluation method to determine the flows through servers based on the defined system input parameters. It calculates the limiting values of input flow intensity for which the system remains in a steady state and identifies the critical resource in the system for each value of 𝐾 and π‘Ÿ. + +- **Simulation:** A comprehensive simulation functionality is provided to emulate the system's operation. It generates and averages the results of 100 simulations for each combination of parameters π‘Ÿ and 𝐾, thereby offering a detailed insight into the system's behavior under different conditions. + +- **Documentation and Analysis:** An in-depth analysis and documentation of the simulation method, analytical problem solving, and comparative analysis of the results obtained are encapsulated in this project. It provides tabular reports of relative deviations and constructs various diagrams depicting different dependencies and critical resources, enhancing the understanding of the system's performance. + +## Configuration + +**Parameters Configuration:** The `parameters.py` file contains configurable parameters essential for the simulation such as processing speeds, probabilities, and simulation parameters. + +**System Schema Generation:** The `generate.py` file houses the function `generate_schema(number_of_disks)` crucial for generating a schema of the system, which can be modified to alter the system's schema. + +## How-To Run + +Install the required dependencies with: +```bash +pip install -r requirements.txt +``` +Execute the program by running: +```bash +python main.py +``` From 61ef94598aeea0a4950f8887a26b3763e9f124ba Mon Sep 17 00:00:00 2001 From: RenatusRS Date: Thu, 12 Oct 2023 10:36:36 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 78 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 7ee642f..d9d2ca0 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,77 @@ > Project for **Computer Systems Performance** / **Performanse Računarskih Sistema** class. -## Introduction +Python-based application that performs analytical calculations on the specified parameters. -This project, implemented in Python, models a multiprogramming computer system via an open network operating in a steady-state regime. The simulated system consists of a processor, three system disks, and 𝐾 user disks, with jobs arriving at the processor following a Poisson process with intensity 𝛼. The system operates on exponential processing and service times with respective averages of 𝑆𝑝 = 6.25π‘šπ‘  for the processor, 𝑆𝑑1 = 10π‘šπ‘  for the first system disk, 𝑆𝑑2 = 𝑆𝑑3 = 15π‘šπ‘  for the second and third system disks, and π‘†π‘‘π‘˜ = 25π‘šπ‘  for user disks. +Following the analytical calculations, it simulates an open network system, generating jobs that enter the system in accordance with a Poisson distribution. The user-configurable schema determines how these jobs are transferred between the system's components. -The project facilitates the analytical evaluation and simulation of the system, determining the utilization of resources, flows through resources, average number of jobs at each resource, and the system's response time with a central server for varying numbers of user disks (𝐾) and input flow intensities (π‘Ÿ β‹… π›Όπ‘šπ‘Žπ‘₯, π‘Ÿ ∈ {0.25,0.50,0.77, 0.99}). It identifies the critical resource in the system and provides a detailed comparison between the analytical and simulated results. +Finally, the findings are presented in Excel tables, text, and visual graphs. ## Features - -- **Analytical Evaluation:** The project offers a robust analytical evaluation method to determine the flows through servers based on the defined system input parameters. It calculates the limiting values of input flow intensity for which the system remains in a steady state and identifies the critical resource in the system for each value of 𝐾 and π‘Ÿ. +- **Analytical Solution**: Uses input parameters to compute server flows and identifies the bottleneck system resource. Applies Jackson's theorem in calculation for other parameters. Provides expected values for the given system. -- **Simulation:** A comprehensive simulation functionality is provided to emulate the system's operation. It generates and averages the results of 100 simulations for each combination of parameters π‘Ÿ and 𝐾, thereby offering a detailed insight into the system's behavior under different conditions. +- **Simulation**: Examines system behavior, showing dynamics for different configurations and job intensities. Provides simulated values for the given system. -- **Documentation and Analysis:** An in-depth analysis and documentation of the simulation method, analytical problem solving, and comparative analysis of the results obtained are encapsulated in this project. It provides tabular reports of relative deviations and constructs various diagrams depicting different dependencies and critical resources, enhancing the understanding of the system's performance. +- **Analysis & Documentation**: Compares results from the analytical method with simulation outcomes and averages from several runs. The data is presented visually for clarity. ## Configuration +### parameters.py +This file hosts the adjustable parameters for the simulation. + +#### Default Values + +**Processing Speed** +| Parameter | Default Value | +|----------------------------------|---------------| +| Processor | 6.25ms | +| System Disk 1 | 10ms | +| System Disk 2 | 15ms | +| System Disk 3 | 15ms | +| User Disk | 25ms | + +**Processor Transfer Probability** +| Parameter | Default Value | +|----------------------------------|---------------| +| System Disk 1 | 15% | +| System Disk 2 | 10% | +| System Disk 3 | 5% | +| User Disk | 50% | +| Processor | 20% | + +**System Disk Transfer Probability** +| Parameter | Default Value | +|----------------------------------|---------------| +| Processor | 30% | +| Self | 20% | +| User Disk | 50% | + +**Variables** +| Parameter | Default Value | +|----------------------------------------------|--------------------------| +| r (job arrival rate modification) | [0.25, 0.50, 0.77, 0.99] | +| K (num. of user disks) | [2, 3, 4, 5] | + +**Simulation Parameters** +| Parameter | Default Value | +|----------------------------------|-----------------| +| Simulation Time | 30 minutes | +| Number of Simulations | 100 | + +> **Note:** The specified simulation time pertains to simulated durations, not the real-time operation of the program. -**Parameters Configuration:** The `parameters.py` file contains configurable parameters essential for the simulation such as processing speeds, probabilities, and simulation parameters. +### generate.py +This file contains the `generate_schema(number_of_disks)` function that molds the system's schema. For those looking to modify the system's architecture, tweaking this function will be essential. To grasp the role and functionality of each class, please delve into the "simulation" folder. -**System Schema Generation:** The `generate.py` file houses the function `generate_schema(number_of_disks)` crucial for generating a schema of the system, which can be modified to alter the system's schema. +#### Default Schema +![Placeholder Image for Default Schema](path_to_image.png) ## How-To Run +1. Ensure you have the required dependencies: + ``` + pip install -r requirements.txt + ``` -Install the required dependencies with: -```bash -pip install -r requirements.txt -``` -Execute the program by running: -```bash -python main.py -``` +2. Execute the program by running `main.py`: + ``` + python main.py + ``` From cd031f6321b93375f8ee5ae88181b208875a50ab Mon Sep 17 00:00:00 2001 From: Uros Loncar Date: Tue, 17 Oct 2023 10:00:22 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9d2ca0..92aa4ec 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ This file hosts the adjustable parameters for the simulation. This file contains the `generate_schema(number_of_disks)` function that molds the system's schema. For those looking to modify the system's architecture, tweaking this function will be essential. To grasp the role and functionality of each class, please delve into the "simulation" folder. #### Default Schema -![Placeholder Image for Default Schema](path_to_image.png) +![image](https://github.com/RenatusRS/Open-Network-Simulation/assets/19864929/597c1e93-71b4-4fe7-b3d0-f18006c35847) ## How-To Run 1. Ensure you have the required dependencies: From 4fe94fd7c21686c424ae9d608e4388c858fc04d7 Mon Sep 17 00:00:00 2001 From: Uros Loncar Date: Tue, 17 Oct 2023 10:06:25 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 92aa4ec..b9a4deb 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Following the analytical calculations, it simulates an open network system, gene Finally, the findings are presented in Excel tables, text, and visual graphs. +The `results/output` folder contains an example output for the default parameters. + ## Features - **Analytical Solution**: Uses input parameters to compute server flows and identifies the bottleneck system resource. Applies Jackson's theorem in calculation for other parameters. Provides expected values for the given system. @@ -21,7 +23,7 @@ This file hosts the adjustable parameters for the simulation. #### Default Values -**Processing Speed** +_**Processing Speed**_ | Parameter | Default Value | |----------------------------------|---------------| | Processor | 6.25ms | @@ -30,7 +32,7 @@ This file hosts the adjustable parameters for the simulation. | System Disk 3 | 15ms | | User Disk | 25ms | -**Processor Transfer Probability** +_**Processor Transfer Probability**_ | Parameter | Default Value | |----------------------------------|---------------| | System Disk 1 | 15% | @@ -39,24 +41,24 @@ This file hosts the adjustable parameters for the simulation. | User Disk | 50% | | Processor | 20% | -**System Disk Transfer Probability** +_**System Disk Transfer Probability**_ | Parameter | Default Value | |----------------------------------|---------------| | Processor | 30% | | Self | 20% | | User Disk | 50% | -**Variables** +_**Variables**_ | Parameter | Default Value | |----------------------------------------------|--------------------------| | r (job arrival rate modification) | [0.25, 0.50, 0.77, 0.99] | | K (num. of user disks) | [2, 3, 4, 5] | -**Simulation Parameters** +_**Simulation Parameters**_ | Parameter | Default Value | |----------------------------------|-----------------| | Simulation Time | 30 minutes | -| Number of Simulations | 100 | +| Number of Simulations | 10 | > **Note:** The specified simulation time pertains to simulated durations, not the real-time operation of the program.