-
process_utils.h
:- Contains the
Process
structure and function declarations for process creation and sorting.
- Contains the
-
process_utils.c
:- Implements the utility functions for process generation, sorting, and setup.
-
queue_utils.h
:- Contains the
Queue
structure and function declarations for queue creation and queue operations like enqueue and dequeue.
- Contains the
-
queue_utils.c
:- Implements the utility functions for queue operations like enqueue and dequeue.
-
fcfs.c
:- Implements the First-Come First-Served (FCFS) scheduling algorithm.
-
rr.c
:- Implements the Round Robin (RR) scheduling algorithm.
-
srtf.c
:- Implements the Shortest Remaining Time First (SRTF) scheduling algorithm.
-
sjf.c
:- Implements the Shortest Job First (SJF) scheduling algorithm, handling time chart visualization and metrics calculation.
-
simulation.h
:- Contains declarations of all scheduling algorithms and their helper functions
-
main.c
:- The main program where all the scheduling algorithms are run for 5 trials.
- Include
process_utils.h
,queue_utils.h
andsimulation.h
in your scheduling algorithm file. - Link all files with
.c
during compilation.
gcc -o main *.c
./main
-
queue_utils.h
:- Contains the
Queue
structure and function declarations for queue creation and queue operations like enqueue and dequeue.
- Contains the
-
queue_utils.c
:- Implements the utility functions for queue operations like enqueue and dequeue.
-
main.c
:- The main program containing all definitions and declarations for functions involved in the multithreading process for simulating concert ticket selling.
- Include
queue_utils.h
in the main.c file. - Link all files with
.c
during compilation.
gcc -o main *.c
./main <insert queue size here>
-
utils.h
:- Contains the structures for Queue, Page, Process and Page List, and function declarations for queue creation and queue operations like enqueue and dequeue, as well as process creation, page list initialization, and other page helper functions.
-
utils.c
:- Implements the utility functions declared in utils.h
-
main.c
:- The main program containing all definitions and declarations for functions involved in the paging and swapping simulation.
-
helper.h
:- Contains function prototypes for simulating page replacement algorithms during process execution.
-
fifo.c
,lru.c
,lfu.c
,randomPick.c
andmfu.c
:- Simulates the FIFO, LRU, LFU, Random Pick and MFU page replacement algorithms respectively.
- Include
helper.h
in the main.c file. - Link all files with
.c
during compilation.
gcc -g *.c -o main
./main