Github LINK - https://github.com/satwikgarg2022461/OS_assignment3_SimpleSchedular.git
This code is made by Satwik Garg and Saurav Haldar
- We fork the simple schedular in simple shell as deamon
- We create a function named submit which fork the execution process then parent send the queue to simple schedular using shared memory created using shm_open
- Simple schedular received queue from Simple shell using shm_open
- An infinite while(1) loop is used to keep the simple schedualer daemon
- Then we continue the process submitted by the user using kill(pid, SIGCONT)
- Simple schedualer then sleep for TSLICE
- Then it stop all processes using kill(pid, SIGSTOP)
- A dummmy_main.h header is created for sending the termination details from the user input file to simple scheduler
- We also created a shared memory in dummy_main.h for sending the data of termination to the simple Schedular
- Add the line --> #include "dummy_main.h" in your code after adding the adding the other headers.
- Then type the make in the terminal
- Use sumbit for executing the process in simple shell
- For exiting use ctrl+c or exit
- User should only terminate Simple Shell after all the processes are complete.
- If it is terminated before then simple Shell will not work in the next execution.
- user is not allowed to submit any program that has blocking calls, e.g., scanf, sleep, etc., and the user program cannot have any command line parameters