Simple Scheduller
Simple Scheduller
Report
Submitted by Group ID Number - 62
1. Akshit Gupta 2022058
2. Manit Kaushik 2022277
Contributions -
SimpleScheduler Implementation -
● Global Variables:
These variables serve as a central repository for process data, facilitating easy
access and management throughout the program.
The struct process_node structure represents a process with details like file
name, process ID, execution status, priority, start and end times.
A process queue is created within the PCB, enabling the addition and retrieval of
processes in a structured manner.
add_to_pcb function adds a process (specified by a file name and priority) to the
process queue (PCB).
It creates a new process node and populates it with pertinent process details such
as the file name, process ID, execution status, and priority. This function is critical
for building and maintaining the process queue within the PCB.
● Signal Handling:
Upon receiving this signal, the program initiates the scheduler, demonstrating the
role of signal handling in coordinating program flow.
● Scheduler Logic:
The scheduler logic is initiated upon receiving the SIGUSR1 signal. It iterates
through the process queue and executes processes based on their priority and
time quantum (TSLICE).
User input is critical for initiating the scheduler, adding processes to the
scheduler's queue, or exiting the program.
This user interaction mechanism is the primary means of controlling and directing
the program's behavior.
● Printing History:
This history section offers users insights into the program's behavior and provides
a record of executed commands.