anunciado / IMD0036-Scheduler

A task scheduler simulator for UFRN IMD class IMD0036: Operating Systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scheduler

In this project, we implemented a scheduler simulator that allows the control of the behavior of processes, with the algorithms: FIFO (First in, first out), where as its own name already says, the first one that arrives will be the first one to be executed, non-preemptivo, that is, it executes the whole process from beginning to end not interrupting the executed process until finalized; RR (Round Robin), in this scheduling the operating system has a timer, called quantum, where all processes gain the same quantum value to run on the CPU, after the quantum ends and the process does not end, a preemption occurs and the process is inserted into the quantum. end of the queue. If the process finishes before a quantum, the CPU is released for the execution of new processes, and finally, Normal, where the scheduling will be given only by its priority. The files that contain the execution parameters of the processes are in tables separated by commas without the names of the columns. As shown below:

ID Priority Quantum Timeleft
1 2 2 4
2 3 4 5
3 4 5 6

The ID determines its unique number among existing processes, priority determines its execution priority in relation to the other processes, the quantum determines the execution time given to it for preemptive type schedules, and timeleft determines the execution time remaining for the process is finished. After reading the process file and storing it in the process table, it will be executed according to the scheduling algorithm.

Prerequisites

You will need to install the modules below to run the program:

Running

There are two ways to run the program:

  • Compile the IDE (PyCharm - Python IDE):
  1. Just open the IDE
  2. Import the project folder as a Project
  3. Select Run/Debug Configurations: For scheduling:
<processesfile> <typeofscheduler>

An example would be:

./tests/input.txt normal
  1. Choose Run scheduling on the context menu.
  2. From this it only interacts with the system and add in script parameters box contents:
  • Compile by terminal:
  1. Enter the src folder and run the following command: For scheduling:
python scheduling.py <processesfile> <typeofscheduler>

An example would be:

python scheduling.py ./tests/input.txt normal
  1. From this it only interacts with the system.

Built With

Authors

Developers:

Project Advisor:

See also the list of contributors who participated in this project.

License

This project is licensed under the GPL 3.0 - see the LICENSE file for details

About

A task scheduler simulator for UFRN IMD class IMD0036: Operating Systems.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%