Dispatcher
is a simple scheduler test application developed using the Qt framework. The application simulates basic process management functionalities, including creating, switching, blocking, unblocking, and deleting processes. It provides a graphical user interface to manage and visualize these processes.
- Create New Process: Add new processes to the scheduler.
- Trigger Switch: Switch the currently running process to the ready state.
- Block Process: Block a specified process by its ID.
- Un-Block Process: Unblock a specified process by its ID.
- Delete Process: Delete a specified process by its ID.
- Process Visualization: Display processes in different states (Running, Ready, Blocked) using tables and lists.
- Qt 5.x or later
- Qt Creator (optional, for development)
git clone https://github.com/username/dispatcher.git
cd dispatcher
- Open
dispatcher.pro
in Qt Creator. - Configure the project if prompted.
- Click the "Build" button (hammer icon) to compile the project.
- Click the "Run" button (green play icon) to launch the application.
- Open a terminal (or Command Prompt/PowerShell on Windows).
- Navigate to the project directory.
- Generate Makefiles with qmake:
qmake dispatcher.pro
- Build the project:
make # or on Windows with MinGW mingw32-make
- Run the application:
./dispatcher # or on Windows dispatcher.exe
- Click the "Create New Process" button to add a new process to the scheduler.
- The new process will appear in the "Processes" table and the "Ready Queue".
- Click the "Trigger Switch" button to switch the currently running process to the ready state.
- The process state will be updated in the "Processes" table.
- Enter the process ID in the "Block Process" input field.
- Click the "Block Process" button to change the state of the specified process to "Blocked".
- The process will move from the "Ready Queue" to the "Blocked List".
- Enter the process ID in the "Un-Block Process" input field.
- Click the "Un-Block Process" button to change the state of the specified process to "Ready".
- The process will move from the "Blocked List" to the "Ready Queue".
- Enter the process ID in the "Delete Process" input field.
- Click the "Delete Process" button to remove the specified process from the scheduler.
- The process will be removed from all relevant tables and lists.
mainwindow.h
andmainwindow.cpp
: Define and implement the main window and its functionalities.scheduler.h
andscheduler.cpp
: Define and implement the process and scheduler logic.ui_mainwindow.h
: Generated by Qt Designer, contains UI components.
This project is licensed under the MIT License. See the LICENSE file for details.