What is the relationship between swap time and the quantum for which the process is expected to have control of CPU?
(Please help, Operating System question, 6 points)
Swapping is implemented by a medium term scheduler, in which a process is temporarily swapped out of main memory to secondary storage to make that memory available to other processes. After time, the system swaps back the process from the secondary storage to main memory and the process resumes from the point where it stopped.
Time quantum or time slice is the period of time for which the process is allowed to run in a preemptive multitasking system. When the time quantum is quite large then the Round Robin scheduling algorithm becomes a First Come First Serve scheduling algorithm and when it is too short it causes many context switches, thus reducing CPU efficiency as no useful work is done during that time.
When a process consumes their time slice then the process will be swapped out of memory and new process will be moved to the main memory. The swapping time is usually quite high. For efficient CPU usage, the execution time should be longer than the swap time. Therefore the round robin scheduling CPU is used, where the time quantum be greater than the swap time.
PLEASE LIKE THE ANSWER IF YOU FIND IT HELPFUL OR YOU CAN COMMENT IF YOU NEED CLARITY / EXPLANATION ON ANY POINT.
Get Answers For Free
Most questions answered within 1 hours.