MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

scheduling/multi_level_feedback_queue.py:25–41  ·  view source on GitHub ↗
(
        self,
        number_of_queues: int,
        time_slices: list[int],
        queue: deque[Process],
        current_time: int,
    )

Source from the content-addressed store, hash-verified

23 """
24
25 def __init__(
26 self,
27 number_of_queues: int,
28 time_slices: list[int],
29 queue: deque[Process],
30 current_time: int,
31 ) -> None:
32 # total number of mlfq's queues
33 self.number_of_queues = number_of_queues
34 # time slice of queues that round robin algorithm applied
35 self.time_slices = time_slices
36 # unfinished process is in this ready_queue
37 self.ready_queue = queue
38 # current time
39 self.current_time = current_time
40 # finished process is in this sequence queue
41 self.finish_queue: deque[Process] = deque()
42
43 def calculate_sequence_of_finish_queue(self) -> list[str]:
44 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected