Instructed by Prof. Ali Movaghar from the Department of Computer Engineering, Sharif University of Technology.
This repository contains a simulation of the M/M/1/K queue model, a classic queuing theory concept commonly used in the analysis of computer systems and network performance. These simulations are designed to analyze the performance of these queues under different scenarios.
Parameters:
- Service Rate (μ): The rate at which the service is provided.
- Arrival Rate (λ): The rate at which arrivals occur.
- Queue Capacity (K): Set to 14.
Key Aspects Covered:
- Performance Metrics: Calculation of the probability of having
n
customers in the system (P_n
), average number of customers in the system (N_c
), and probabilities of blocking (P_b
) and dropping (P_d
). - Simulation Results: Results showing the impact of varying parameters on system performance.
- Formulas Used:
P_n(λ, μ)
for the probability ofn
customers.N_c
for the average number of customers.- Calculation of
P_b
andP_d
using the provided formulas.
- Analysis: Discussion on the impact of different parameters on system performance.
Key Aspects Covered:
- Round Robin Scheduling: Examination of the algorithm's performance in managing queues.
- Performance Metrics: Analysis of average wait time and throughput under different configurations.
- Theoretical Evaluation:
- Calculation of performance metrics with given parameters (μ and θ).
- Breakdown of theoretical results and their implications.
- Evaluation of the impact of different time slices and system configurations.
Key Aspects Covered:
- Priority-Based Service: Analysis of how tasks or requests are processed based on assigned priority levels, enabling differentiation in service rates.
- Performance Metrics:
- Calculation of metrics such as weighted average response time, throughput, and utilization for tasks with different priorities.
- Probability distribution of customers in the system based on priority classes.
- Theoretical Evaluation:
- Derivation of performance equations for systems with multiple priority levels.
- Impact of priority differentiation on overall system performance and fairness.
-
FCFS_Simulation.py: FCFS Service Order
-
PS_Simulation.py: Processor Sharing Service Order
-
DPS_Simulation.py: Discriminatory Processor Sharing Service Order
Evaluation Results for M/M/1/12 Queue with Exponential and Fixed Theta under different customer loads are available in the following files:
-
FCFS_K12_thetaExp_10M , FCFS_K12_thetaFixed_10M, FCFS_K12_thetaExp_300M , FCFS_K12_thetaFixed_300M
-
PS_K12_thetaExp_10M , PS_K12_thetaFixed_10M, PS_K12_thetaExp_100M , PS_K12_thetaFixedFixed_100M
-
DPS_K12_thetaExp_1M , DPS_K12_thetaFixed_1M, DPS_K12_thetaExp_10M
- Mor. Harchol-Balter, “Performance modeling and design of computer systems: queueing theory in action", Cambridge University Press, 2013.
- Krishna. Kant, "Introduction to computer system performance evaluation" International Edition, 1992.
If you have an issue or found a bug, please raise a GitHub issue here. Pull requests are also welcome.