OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
OS module contains some methods which provides an interface to the scheduler and used to control how a process is allocated CPU time by the operating system.
os.sched_rr_get_interval() method in Python is used to get the Round Robin quantum in seconds for the process indicated by the specified process id.
What is Round Robin quantum?
In the Round-Robin scheduling policy, processes are dispatched in a FIFO manner but are given a limited amount of CPU time called a time-slice or a quantum.
Note: This method is only available on some UNIX platforms.
pid: The process id of the process whose Round Robin quantum value is required. A pid of 0 represents the calling process.
Return Type: This method returns an float value which represents the Round Robin quantum in seconds.
Round Robin time quantum (in seconds): 0.016
- class method vs static method in Python
- Python | os.dup() method
- Python | set() method
- Python | next() method
- Python | os.scandir() method
- Python | cmath.log() method
- Python | os.ctermid() method
- Python | os.getppid() method
- Python | Tensorflow abs() method
- Python | cmath.exp() method
- Python | os.strerror() method
- Python | sys.getrecursionlimit() method
- Python | os.readv() method
- Python | Tensorflow log() method
- Python | os.writev() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.