Explain Shortest Remaining Time Next (SRTN) scheduling algorithm with example | Operating System Question & Answer

SRTN: Shortest Remaining Time Next
A Shortest remaining Time Next scheduling algorithm is also referred as preemptive SJF scheduling algorithm. When a new process arrives at ready queue while one process is still executing then SRTN algorithm is performed to decide which process will execute next. This algorithm compare CPU burst time
of newly arrived process with remaining (left) CPU burst time of currently executing process. If CPU burst time of new process is less than remaining time of current process then SRTN algorithm preempts current process execution and starts executing new process. 

Example: Consider four processes with arrival time and burst time mentioned below in table.

Gantt chart: 


Post a Comment

0 Comments