Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Round-robin process scheduling #242

Open
Ram-Aditya opened this issue Oct 18, 2018 · 10 comments
Open

Round-robin process scheduling #242

Ram-Aditya opened this issue Oct 18, 2018 · 10 comments
Labels
good first issue Good for newcomers intermediate Intermediate Issue systems Systems related Issues

Comments

@Ram-Aditya
Copy link
Collaborator

Ram-Aditya commented Oct 18, 2018

Description

  • Implement the round robin process scheduling algorithm with a time quantum of 2 microseconds.

  • The input to your algorithm must be a 2-D array that contains values for 'Burst Time' and 'Arrival Time', for 20 processes. Initialize random values for each of the 2 attributes for each process and print this table.

  • The expected output must contain the following details:

    • The order in which processes were scheduled.
    • At what time each process was scheduled.
    • Waiting time for each process ( The total amount of time the process spent waiting in the ready queue.)
    • Turn-around time for each process ( The total amount of time from arrival till completion.)
    • The total number of context switches.
  • The acceptable range of values for input:
    Burst Time: [0,10]microseconds
    Arrival Time: [0,50]seconds
    *Burst Time is the amount of time the process requires to execute on the CPU.

Details

  • Technical Specifications:
    • A total of 4 implementations will be accepted.
  • Type of issue: No more than one implementation will be accepted for each language. Once the implementation for a language has been taken up you must choose a different language.
  • Time Limit: The claim for the issues will be given on a first-come, first-serve basis. Once you take this issue up in a particular language, you must complete it within 3 days, failing which the issue will be allocated to the next person who requested for this issue.
  • Additional Instructions:
    • While making the Pull Request, attach screenshots of 5 sample inputs and their corresponding output.

Issue Progress - Languages that have been claimed

Will be updated as and when the issue is claimed.

Resources

https://www.tutorialspoint.com/operating_system/os_process_scheduling_algorithms.htm

Directory Structure

For this issue, use the following directory of the Hacktoberfest-2k18 repository:
/systems/os/process_scheduling/rr/language_name
(where language_name is one of the languages mentioned above.)

Note

Please claim the issue first by commenting here before starting to work on it. Please mention in which language you would like to implement the program in.

@Ram-Aditya Ram-Aditya added good first issue Good for newcomers intermediate Intermediate Issue systems Systems related Issues operating systems Issues related to Operating Systems labels Oct 18, 2018
@1337M0nst3r
Copy link
Contributor

I'm gonna give this a try in C++

@Ram-Aditya
Copy link
Collaborator Author

@1337M0nst3r Yes sure. Please make sure to submit within 3 days.

@1337M0nst3r
Copy link
Contributor

@Ram-Aditya how should the program take input?

@Ram-Aditya
Copy link
Collaborator Author

@1337M0nst3r You can initialize a 2-D array which contains Burst Time and Arrival Time for 20 processes with random values that belong to the acceptable ranges, which has been mentioned in the issue description.

@1337M0nst3r
Copy link
Contributor

@Ram-Aditya so I just create an array like described above each time to program is run?

@Ram-Aditya
Copy link
Collaborator Author

@1337M0nst3r Yes.

@1337M0nst3r
Copy link
Contributor

@Ram-Aditya thanks, I thought I got it wrong

@Ram-Aditya Ram-Aditya removed the operating systems Issues related to Operating Systems label Oct 19, 2018
@1337M0nst3r
Copy link
Contributor

@Ram-Aditya sorry to bother you again but what did you mean by "at what time each process was scheduled"?

@Ram-Aditya
Copy link
Collaborator Author

Ram-Aditya commented Oct 20, 2018

@1337M0nst3r A process can either be in the ready queue, i.e it has already arrived but is waiting for another process which is already executing to let go of CPU, or has been "scheduled" and is using the CPU. In a round-robin scheduling scenario, when a process's turn arrives, it will be scheduled and when it finishes executing on the CPU for a time interval equal to time quantum, it will be put back into the ready queue. Thus a single process may be given CPU access or will be "scheduled" multiple times ( i.e until the cumulative sum of its execution time on the CPU is equal to its burst time.). These times at which it was given CPU access or "scheduled" is what is meant by "at what time each process was scheduled". Feel free to reach out in case of further doubts.

@1337M0nst3r
Copy link
Contributor

@Ram-Aditya thanks for help!

This was referenced Oct 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers intermediate Intermediate Issue systems Systems related Issues
Projects
None yet
Development

No branches or pull requests

2 participants