HOST Dispatcher project to simulate a simple process dispatcher and scheduler.
Description:
The project involves implementing a HOST dispatcher process scheduler component for an OS (preferably UNIX based).
The following sequence illustrates how it works:
- The process list is read from console. Each process contains its priority, runtime, and a list of resources including memory.
- A job queue is created according to the time slice corresponding to the arrival time for each process.
- The processes are processed into a real-time queue or user-queue given the priority for each process. (Note the processes are only processed into the queues if resources can be allocated for all the processes in the queues - not including the job queue).
- If the real-time queue contains a process, it is run until it terminates. If the real-time queue is empty, we pick the highest priority non-empty queue and pop a process to run for the time slice.
- If the process has not completed its run time for the time slice, it is pushed into the lower priority queue.
- The steps are repeated till all queues are empty.
The processor time slice for this project is 1 second.
Usage (tested on Ubuntu linux):
- Clone the repository: https://github.com/Umar-Eh/HOST-Dispatcher.git
- Run the command make to create the hostd executable.
- Run the command ./hostd to simulate the process dispatcher.
Please note that there is a pre-compiled process binary used by the hostd dispatcher to simulate a process. You may
create your own process binary and place it in the program directory.
To-do:
- Create windows compatibility.
- Add a testing framework.