OS Algorithm Simulator
What is OS Algorithm Simulator?
OS Algorithm Simulator is an educational application that allows you to simulate the algorithms that make an Operating System (OS) work.
As you may know, the main objective of an OS is to manage 4 resources:
- The CPU.
- The Memory.
- The Input/Output (I/O) System.
- The File System.
Each OS contains several algorithms that provide the above functionalities. For instance:
- A CPU scheduling algorithm chooses which process should take the CPU in each instant.
- Another algorithm is in charge of not letting a deadlock happen when processes allocate resources.
- A memory management algorithm divides the memory in portions for each process, and another decides which portions should be swapped and which ones should stay in RAM. Allocation may be contiguous or not. In the latter case we will have more modern mechanisms such as paging or segmentation. Then, a page replacement algorithm will decide which pages can stay in memory and which pages do not.
- Another algorithm is in charge of paying attention to all the interruptions that the hardware can produce to the I/O system.
- And so on.
In order to understand an OS deeply, one must know how these algorithms work and why some approaches that seem reasonable have been discarded by well-known Operating Systems such as Windows or Linux. The goal of this application is to provide explanations about different approaches to each problem and to illustrate how the each algorithm works by means of simulations. For that purpose, this app contains some examples, but it also allows you to provide your own datasets and check how each algorithm would perform on them. It is also important to say that in most of the cases, this application does not contain the state-of-the-art algorithms, but simplifications that we consider better for the learning process.
Features
Process scheduling algorithms:
Several preemptive and non-preemptive algorithms:
- First Come First Served
- Shortest Job First
- Shortest Remaining Time First
- Priority-based (non-preemptive)
- Priority-based (preemptive)
- Round Robin
Deadlock algorithms:
- Deadlock avoidance (banker's algorithm).
Contiguous memory allocation algorithms:
- First fit
- Best fit
- Worst fit
Page replacement algorithms:
- Optimal page replacement
- First-In-First-Out
- Least Recently Used
- First-In-First-Out with second chance
- Not Frequently Used
- Aging
For each algorithm:
- It allows the creation of custom datasets for simulation.
- It includes a test mode in order to test your comprehension.