Skip to content

ChristosHadjichristofi/OS-NTUA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Operating Systems - NTUA

Byte Code Size # Lines of Code # Languages Used Top language Last commit

Lab Exercises

  • This lab was focused on:
  • This lab was focused on:

    • Creating a round-robin scheduler. The scheduler is a parent proccess in the user space, distributing computational time in child processes. In order to control the processes, the scheduler will use the SIGSTOP and SIGCONT signals to stop and activate each process, respectively. Every proccess is being executed for a period of time equal to tq. If the proccess is terminated before the time equal to tq, the scheduler removes the proccess from the queue and activates the next one. If the time quantum is been reached and the proccess won't finish, the proccess terminates, its been placed to the end of the queue and the next proccess is been activated. The operation of the scheduler is required to be asynchronous based on signals. The scheduler will be using the SIGALRM (when the time quantum is reached the scheduler stops the current proccess) and SIGCHLD (pause or terminate the proccess) signals. Every proccess has its own id. The scheduler shows relevant messages at activation/pause/termination of a proccess. When all the proccesses are finished, the scheduler also terminates. Execution of the scheduler: ./scheduler prog prog prog prog
    • Operation check of the scheduler through shell. Extending the previous code we need to support the control of the operations of the scheduler through the shell. The user must be able to request dynamic creation and termination of proccesses while interacting with the shell. Shell will be receiving commands from the user, issue requests of the right form and send them to the scheduler. Receive replies (success/fail) of the outcome of their executions and informs the user. Commands of the shell:
      • 'p' : prints a list with the running proccesses. Id,PID,Name are shown.
      • 'k' : Gets the ID of a proccess (not the PID) and asks from the scheduler to terminate that proccess.
      • 'e' : Gets the Name of a running proccess and asks from the scheduler to create a proccess with that name.
      • 'q' : Shell terminates its operation.
    • Implement priorities in the scheduler. Extending the previous code we need also to support priorities in the running proccesses queue. There must be two priorities, High and Low. If there are any High priority proccesses in the queue, only those are been executed using round-robin. If there are olny Low priority proccesses in the queue, they are been executed using round-robin. In order to change the priority of any proccess the following command must be given:
      • Make a low priority proccess high priority: 'h' id_of_the_proccess
      • Make a high priority proccess low priority: 'l' id_of_the_proccess
    Parts of code were given from the lecturers teaching this course.

About

[ECE NTUA] Assignments for Operating Systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published