SlideShare a Scribd company logo
Shortest Remaining Time (SRT)


 Is the preemptive version of the SJN (Shortest
  Job Next) algorithm. The processor is allocated
  to the job closest to completion --- but even this
  job can be preempted if the newer job in the
  READY queue has a time to completion that’s
  shorter.
 This algorithm can be implemented in an interactive
  system because it requires advance knowledge of
  the CPU time required to finish each job. It is often
  used in batch environments, when it is desirable to
  give preference to short job; even though SRT
  involves more overhead than SJN because the
  operating system has to frequently monitor the CPU
  time for all the jobs being swapped (switched) at
  preemption time (not necessarily swapped out to the
  disk although this might occur as well).
Example:

 The example in Figure 1 shows how the SRT algorithm
  works in four jobs that arrived in quick succession (one
  CPU cycle part).
Figure 1. timeline for job sequence A, B,C,D using the preemptive SRT
algorithm. Each job is interrupted after one CPU cycle if another job is
waiting with less CPU time remaining
 In this case, the turn around time is the completion time of each job
   minus its arrival time:



Job              A   B       C   D



Turnaround        14 4       1   6


                                      14+4+1+6
So the average turnaround time is:
                                           4        = 6.25

More Related Content

What's hot

Process scheduling
Process schedulingProcess scheduling
Process scheduling
Deepika Balichwal
 
Process management
Process managementProcess management
Process management
Birju Tank
 
RTOS
RTOSRTOS
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
Kumbirai Junior Muzavazi
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
hashim102
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Ajit Nayak
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
Shipra Swati
 
OS Process and Thread Concepts
OS Process and Thread ConceptsOS Process and Thread Concepts
OS Process and Thread Concepts
sgpraju
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
Student
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
ritu98
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
Shubhashish Punj
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
Amir Khan
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
Chetan Mahawar
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
Damian T. Gordon
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
sathish sak
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Margrat C R
 

What's hot (20)

Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Process management
Process managementProcess management
Process management
 
RTOS
RTOSRTOS
RTOS
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
OS Process and Thread Concepts
OS Process and Thread ConceptsOS Process and Thread Concepts
OS Process and Thread Concepts
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Operating Systems - Processor Management
Operating Systems - Processor ManagementOperating Systems - Processor Management
Operating Systems - Processor Management
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
cpu scheduling OS
 cpu scheduling OS cpu scheduling OS
cpu scheduling OS
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 

Similar to Srt algorithm

chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
KeyreSebre
 
exp 3.docx
exp 3.docxexp 3.docx
exp 3.docx
Ganesh Chavan
 
Operating System 5
Operating System 5Operating System 5
Operating System 5tech2click
 
Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
AliyanAbbas1
 
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
VADAPALLYPRAVEENKUMA1
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
Yogesh Santhan
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu schedulingRushdi Shams
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Paurav Shah
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
M. Abdullah Wasif
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
Harshit Jain
 
Dos.pptx
Dos.pptxDos.pptx
Dos.pptx
NeyaShree1
 
Ch6
Ch6Ch6
Ch6C.U
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
Farhat Shaikh
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
Nazir Ahmed
 
cpu sechduling
cpu sechduling cpu sechduling
cpu sechduling gopi7
 

Similar to Srt algorithm (20)

chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
exp 3.docx
exp 3.docxexp 3.docx
exp 3.docx
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
 
Process management in os
Process management in osProcess management in os
Process management in os
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu scheduling
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Dos.pptx
Dos.pptxDos.pptx
Dos.pptx
 
Ch6
Ch6Ch6
Ch6
 
Cpu Scheduling Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
OS_Ch6
OS_Ch6OS_Ch6
OS_Ch6
 
OSCh6
OSCh6OSCh6
OSCh6
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 
Ch05
Ch05Ch05
Ch05
 
cpu sechduling
cpu sechduling cpu sechduling
cpu sechduling
 

Recently uploaded

DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdfDOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
Pushpendra Kumar
 
一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理
一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理
一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理
taqyed
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
Ghh
 
Andrea Kate Portfolio Presentation.pdf
Andrea Kate  Portfolio  Presentation.pdfAndrea Kate  Portfolio  Presentation.pdf
Andrea Kate Portfolio Presentation.pdf
andreakaterasco
 
New Explore Careers and College Majors 2024
New Explore Careers and College Majors 2024New Explore Careers and College Majors 2024
New Explore Careers and College Majors 2024
Dr. Mary Askew
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
kakomaeric00
 
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
yuhofha
 
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理
pxyhy
 
Lbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdfLbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdf
ashiquepa3
 
RECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdf
RECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdfRECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdf
RECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdf
AlessandroMartins454470
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
Bruce Bennett
 
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
2zjra9bn
 
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
atwvhyhm
 
Exploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical CommunicatorsExploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical Communicators
Ben Woelk, CISSP, CPTC
 
一比一原版(QU毕业证)皇后大学毕业证如何办理
一比一原版(QU毕业证)皇后大学毕业证如何办理一比一原版(QU毕业证)皇后大学毕业证如何办理
一比一原版(QU毕业证)皇后大学毕业证如何办理
yuhofha
 
MISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMA
MISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMAMISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMA
MISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMA
DK PAGEANT
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
Ghh
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
2zjra9bn
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
pxyhy
 
'Guidance and counselling- role of Psychologist in Guidance and Counselling.
'Guidance and counselling- role of Psychologist in Guidance and Counselling.'Guidance and counselling- role of Psychologist in Guidance and Counselling.
'Guidance and counselling- role of Psychologist in Guidance and Counselling.
PaviBangera
 

Recently uploaded (20)

DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdfDOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
DOC-20240602-WA0001..pdf DOC-20240602-WA0001..pdf
 
一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理
一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理
一比一原版(U-Barcelona毕业证)巴塞罗那大学毕业证成绩单如何办理
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
 
Andrea Kate Portfolio Presentation.pdf
Andrea Kate  Portfolio  Presentation.pdfAndrea Kate  Portfolio  Presentation.pdf
Andrea Kate Portfolio Presentation.pdf
 
New Explore Careers and College Majors 2024
New Explore Careers and College Majors 2024New Explore Careers and College Majors 2024
New Explore Careers and College Majors 2024
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
 
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
 
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理
一比一原版(SFU毕业证)西蒙弗雷泽大学毕业证如何办理
 
Lbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdfLbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdf
 
RECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdf
RECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdfRECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdf
RECOGNITION AWARD 13 - TO ALESSANDRO MARTINS.pdf
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
 
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
 
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
 
Exploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical CommunicatorsExploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical Communicators
 
一比一原版(QU毕业证)皇后大学毕业证如何办理
一比一原版(QU毕业证)皇后大学毕业证如何办理一比一原版(QU毕业证)皇后大学毕业证如何办理
一比一原版(QU毕业证)皇后大学毕业证如何办理
 
MISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMA
MISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMAMISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMA
MISS TEEN GONDA 2024 - WINNER ABHA VISHWAKARMA
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
 
'Guidance and counselling- role of Psychologist in Guidance and Counselling.
'Guidance and counselling- role of Psychologist in Guidance and Counselling.'Guidance and counselling- role of Psychologist in Guidance and Counselling.
'Guidance and counselling- role of Psychologist in Guidance and Counselling.
 

Srt algorithm

  • 1.
  • 2. Shortest Remaining Time (SRT)  Is the preemptive version of the SJN (Shortest Job Next) algorithm. The processor is allocated to the job closest to completion --- but even this job can be preempted if the newer job in the READY queue has a time to completion that’s shorter.
  • 3.  This algorithm can be implemented in an interactive system because it requires advance knowledge of the CPU time required to finish each job. It is often used in batch environments, when it is desirable to give preference to short job; even though SRT involves more overhead than SJN because the operating system has to frequently monitor the CPU time for all the jobs being swapped (switched) at preemption time (not necessarily swapped out to the disk although this might occur as well).
  • 4. Example:  The example in Figure 1 shows how the SRT algorithm works in four jobs that arrived in quick succession (one CPU cycle part).
  • 5. Figure 1. timeline for job sequence A, B,C,D using the preemptive SRT algorithm. Each job is interrupted after one CPU cycle if another job is waiting with less CPU time remaining
  • 6.  In this case, the turn around time is the completion time of each job minus its arrival time: Job A B C D Turnaround 14 4 1 6 14+4+1+6 So the average turnaround time is: 4 = 6.25