This repo includes all codes for the OS program that calculates with a given algorithm (First, Best and Worst).
How to run this script: You have to run cmd (or powershell) in the folder where source codes are downloaded. Run the main code in that command line with a python (version should be higher than 3.0)
-
After you run the command python main.py, It will give you a welcome message and asks you to select Operating System Size
-
Select your desired algorithm (Lowercase or uppercase does not matter) Example: Invalid Input Example for Selection of Algorithm
-
After you adjusted bases of your OS, it will go to main menu. In that menu, there are 6 different options.
It gives you a current situtation of OS.
It provides user to add a new program into location that is determined by the choosen algorithm. The name and size is asken to user also. However, user can give the program name as a just one letter.:exclamation: If there is no possible location, the system will recommend you to do compaction (option 4).
Example: Adding a new program
It helps users to delete a existing program in the OS. Script will ask user to enter the program name that user wants to delete. If OS does not have a program with that spesified name, it will give an warning message and return to main menu.
Example: Removing a non-existing and existing programs
Compaction is a technique to collect all the free memory present in form of fragments into one large chunk of free memory, which can be used to run other processes. Retrieved from GeeksforGeeks
You can use same link (GeeksforGeeks) for further information about compaction.
Example: Compaction
It will reset whole OS by deleting all programs. However, you can not change capacity of OS or fitting algorithm.
Example: Reseting OS
It provides users to quit the program.
Example: Quiting