scheduling.highest_response_ratio_next ====================================== .. py:module:: scheduling.highest_response_ratio_next .. autoapi-nested-parse:: Highest response ratio next (HRRN) scheduling is a non-preemptive discipline. It was developed as modification of shortest job next or shortest job first (SJN or SJF) to mitigate the problem of process starvation. https://en.wikipedia.org/wiki/Highest_response_ratio_next Attributes ---------- .. autoapisummary:: scheduling.highest_response_ratio_next.no_of_process Functions --------- .. autoapisummary:: scheduling.highest_response_ratio_next.calculate_turn_around_time scheduling.highest_response_ratio_next.calculate_waiting_time Module Contents --------------- .. py:function:: calculate_turn_around_time(process_name: list, arrival_time: list, burst_time: list, no_of_process: int) -> list Calculate the turn around time of each processes Return: The turn around time time for each process. >>> calculate_turn_around_time(["A", "B", "C"], [3, 5, 8], [2, 4, 6], 3) [2, 4, 7] >>> calculate_turn_around_time(["A", "B", "C"], [0, 2, 4], [3, 5, 7], 3) [3, 6, 11] .. py:function:: calculate_waiting_time(process_name: list, turn_around_time: list, burst_time: list, no_of_process: int) -> list Calculate the waiting time of each processes. Return: The waiting time for each process. >>> calculate_waiting_time(["A", "B", "C"], [2, 4, 7], [2, 4, 6], 3) [0, 0, 1] >>> calculate_waiting_time(["A", "B", "C"], [3, 6, 11], [3, 5, 7], 3) [0, 1, 4] .. py:data:: no_of_process :value: 5