SlideShare a Scribd company logo
1 of 10
Disk Scheduling
CS 537 - Introduction to Operating Systems
Disk Scheduling
• The operating system is responsible for using hardware efficiently — for the disk drives,
this means having a fast access time and disk bandwidth.
• Access time has two major components
Seek time is the time for the disk are to move the heads to
• the cylinder containing the desired sector.
• Rotational latency is the additional time waiting for the disk
• to rotate the desired sector to the disk head.
• Minimize seek time
• Seek time ≈ seek distance
• Disk bandwidth is the total number of bytes transferred,
• divided by the total time between the first request for
• service and the completion of the last transfer.
Disk Scheduling
• Recall, statistical average seek time is 9 ms
– randomly accessing all over disk
• Multiple requests to disk will arrive while
one is being serviced
• Can drastically reduce average seek time by
intelligent scheduling accesses
Elevator Algorithm
• Similar to SSTF
• One major difference
– next job scheduled is closest to current job but
in one particular direction
– all jobs in other direction are put at the end of
the list
• Similar to an elevator
– it goes up first and then comes back down
Elevator Algorithm
•Reference String: 5, 35, 2, 14, 12, 21, 3, 9, 22, 20
head
5912142021223532
tail
•Calculation of total seek distance:
4 + 3 + 2 + 6 + 1 + 1 + 13 + 32 + 1 = 63
43261113321
A. Frank - P. Weisberg
Elevator Algorithms
C-LookC-Scan
Scan Look
Go until the
last request
Go until the
last cylinder
Service in only
one direction
Service both
directions
Direction
Go until
• Algorithms based on the common elevator principle.
• Four combinations of Elevator algorithms:
– Service in both directions or in only one direction.
– Go until last cylinder or until last I/O request.
Elevator Algorithm
• Avoids starvation
• Provides very good performance
• Still has one major issue
– FAIRNESS
• Jobs in the middle of the disk get serviced
twice as much as jobs at the ends
One-Way Elevator Algorithm
• Exactly like elevator algorithm except
scheduling is done in only one direction
– for example, elevator always goes “up”
• This will require one long seek after
finished going up
– have to go back to the beginning
• This is okay because one long seek doesn’t
take very long
– IBM disk: 15 ms from one end to the other
• This long seek is done infrequently
One-Way Elevator Algorithm
•Reference String: 5, 35, 2, 14, 12, 21, 3, 9, 22, 20
head
5912142021223523
tail
•Calculation of total seek distance:
4 + 3 + 2 + 6 + 1 + 1 + 13 + 33 + 1 = 64
43261113331
One-Way Elevator Algorithm
•Reference String: 5, 35, 2, 14, 12, 21, 3, 9, 22, 20
head
5912142021223523
tail
•Calculation of total seek distance:
4 + 3 + 2 + 6 + 1 + 1 + 13 + 33 + 1 = 64
43261113331

More Related Content

What's hot

Disk scheduling geekssay.com
Disk scheduling geekssay.comDisk scheduling geekssay.com
Disk scheduling geekssay.comHemant Gautam
 
Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Adarsh Kr Sinha
 
Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49myrajendra
 
Disk scheduling algo os
Disk scheduling algo osDisk scheduling algo os
Disk scheduling algo osRahul Narang
 
Sstf scheduling.50
Sstf scheduling.50Sstf scheduling.50
Sstf scheduling.50myrajendra
 
Fcfs scheduling
Fcfs schedulingFcfs scheduling
Fcfs schedulingmyrajendra
 
C look scheduling 51 1
C look scheduling 51 1C look scheduling 51 1
C look scheduling 51 1myrajendra
 
I/O buffering & disk scheduling
I/O buffering & disk schedulingI/O buffering & disk scheduling
I/O buffering & disk schedulingRushabh Shah
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemMeghaj Mallick
 
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...Safe Software
 
C scan scheduling 50 2
C scan scheduling 50 2C scan scheduling 50 2
C scan scheduling 50 2myrajendra
 
Dbms by jeet goyal
Dbms by jeet goyalDbms by jeet goyal
Dbms by jeet goyaljeet1991
 
Wtu 2014 ibm web sphere mq for zos - shared queues
Wtu 2014   ibm web sphere mq for zos - shared queuesWtu 2014   ibm web sphere mq for zos - shared queues
Wtu 2014 ibm web sphere mq for zos - shared queuesAlexander Ross
 
USING EMC FAST SUITE WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMS
USING EMC FAST SUITE  WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMSUSING EMC FAST SUITE  WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMS
USING EMC FAST SUITE WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMSsuri1155
 

What's hot (20)

Disk scheduling geekssay.com
Disk scheduling geekssay.comDisk scheduling geekssay.com
Disk scheduling geekssay.com
 
Disk structure
Disk structureDisk structure
Disk structure
 
Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49
 
Disk scheduling algo os
Disk scheduling algo osDisk scheduling algo os
Disk scheduling algo os
 
Sstf scheduling.50
Sstf scheduling.50Sstf scheduling.50
Sstf scheduling.50
 
Ch9 mass storage systems
Ch9   mass storage systemsCh9   mass storage systems
Ch9 mass storage systems
 
Fcfs scheduling
Fcfs schedulingFcfs scheduling
Fcfs scheduling
 
C look scheduling 51 1
C look scheduling 51 1C look scheduling 51 1
C look scheduling 51 1
 
I/O buffering & disk scheduling
I/O buffering & disk schedulingI/O buffering & disk scheduling
I/O buffering & disk scheduling
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
 
ISR
ISRISR
ISR
 
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
Leveraging FME Workbench and Python Scripts to Create Stylized Oil and Gas KM...
 
C scan scheduling 50 2
C scan scheduling 50 2C scan scheduling 50 2
C scan scheduling 50 2
 
Ch8
Ch8Ch8
Ch8
 
4 lockheed
4 lockheed4 lockheed
4 lockheed
 
Dbms by jeet goyal
Dbms by jeet goyalDbms by jeet goyal
Dbms by jeet goyal
 
Wtu 2014 ibm web sphere mq for zos - shared queues
Wtu 2014   ibm web sphere mq for zos - shared queuesWtu 2014   ibm web sphere mq for zos - shared queues
Wtu 2014 ibm web sphere mq for zos - shared queues
 
USING EMC FAST SUITE WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMS
USING EMC FAST SUITE  WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMSUSING EMC FAST SUITE  WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMS
USING EMC FAST SUITE WITH SYBASE ASE ON EMC VNX STORAGE SYSTEMS
 

Viewers also liked

Ch02 early system memory management
Ch02 early system  memory managementCh02 early system  memory management
Ch02 early system memory managementJacob Cadeliña
 
Kernel development
Kernel developmentKernel development
Kernel developmentNuno Martins
 
Kernel Recipes 2016 - New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 -  New hwmon device registration API - Jean DelvareKernel Recipes 2016 -  New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 - New hwmon device registration API - Jean DelvareAnne Nicolas
 
Virtual file system (VFS)
Virtual file system (VFS)Virtual file system (VFS)
Virtual file system (VFS)Waylin Ch
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxTushar B Kute
 
Chude01 tu nghiencuu_nhom07
Chude01 tu nghiencuu_nhom07Chude01 tu nghiencuu_nhom07
Chude01 tu nghiencuu_nhom07Nguyen Linh Tam
 
Chu de02 tunghiencuu_nhom07
Chu de02 tunghiencuu_nhom07Chu de02 tunghiencuu_nhom07
Chu de02 tunghiencuu_nhom07Nguyen Linh Tam
 
Crowdsourcing Presentation
Crowdsourcing PresentationCrowdsourcing Presentation
Crowdsourcing PresentationLorna McNerney
 

Viewers also liked (19)

Ch02 early system memory management
Ch02 early system  memory managementCh02 early system  memory management
Ch02 early system memory management
 
Kernel development
Kernel developmentKernel development
Kernel development
 
1 04 rao
1 04 rao1 04 rao
1 04 rao
 
Kernel Recipes 2016 - New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 -  New hwmon device registration API - Jean DelvareKernel Recipes 2016 -  New hwmon device registration API - Jean Delvare
Kernel Recipes 2016 - New hwmon device registration API - Jean Delvare
 
OSCh12
OSCh12OSCh12
OSCh12
 
File system
File systemFile system
File system
 
Virtual file system (VFS)
Virtual file system (VFS)Virtual file system (VFS)
Virtual file system (VFS)
 
Vfs
VfsVfs
Vfs
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in Linux
 
Linkers And Loaders
Linkers And LoadersLinkers And Loaders
Linkers And Loaders
 
Linux Vfs
Linux VfsLinux Vfs
Linux Vfs
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
Linkers
LinkersLinkers
Linkers
 
Loaders
LoadersLoaders
Loaders
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Chude01 tu nghiencuu_nhom07
Chude01 tu nghiencuu_nhom07Chude01 tu nghiencuu_nhom07
Chude01 tu nghiencuu_nhom07
 
Flipsider
FlipsiderFlipsider
Flipsider
 
Chu de02 tunghiencuu_nhom07
Chu de02 tunghiencuu_nhom07Chu de02 tunghiencuu_nhom07
Chu de02 tunghiencuu_nhom07
 
Crowdsourcing Presentation
Crowdsourcing PresentationCrowdsourcing Presentation
Crowdsourcing Presentation
 

Similar to Disk scheduling

Disk Management through the Computer Management
Disk Management through the Computer ManagementDisk Management through the Computer Management
Disk Management through the Computer ManagementAnshGoyal32
 
Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2ScyllaDB
 
disk sechduling
disk sechdulingdisk sechduling
disk sechdulinggopi7
 
What to do when detect deadlock
What to do when detect deadlockWhat to do when detect deadlock
What to do when detect deadlockSyed Zaid Irshad
 
fileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdffileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdfAbhishekBhassia
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with PipeliningAneesh Raveendran
 
secondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OSsecondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OSPrincePrajapati22
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportAnwal Mirza
 
Pipeline and Vector Processing Computer Org. Architecture.pptx
Pipeline and Vector Processing Computer Org. Architecture.pptxPipeline and Vector Processing Computer Org. Architecture.pptx
Pipeline and Vector Processing Computer Org. Architecture.pptxitofficial07
 
cs1311lecture25wdl.ppt
cs1311lecture25wdl.pptcs1311lecture25wdl.ppt
cs1311lecture25wdl.pptFannyBellows
 

Similar to Disk scheduling (20)

Disk Management through the Computer Management
Disk Management through the Computer ManagementDisk Management through the Computer Management
Disk Management through the Computer Management
 
Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2Scylla Summit 2022: Scylla 5.0 New Features, Part 2
Scylla Summit 2022: Scylla 5.0 New Features, Part 2
 
disk sechduling
disk sechdulingdisk sechduling
disk sechduling
 
18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx18CSC205J-UNIT-5.pptx
18CSC205J-UNIT-5.pptx
 
What to do when detect deadlock
What to do when detect deadlockWhat to do when detect deadlock
What to do when detect deadlock
 
Operating system
Operating systemOperating system
Operating system
 
fileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdffileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdf
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
 
Io (2)
Io (2)Io (2)
Io (2)
 
Device Management
Device ManagementDevice Management
Device Management
 
Disk Management
Disk ManagementDisk Management
Disk Management
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with Pipelining
 
Unit - 5 Pipelining.pptx
Unit - 5 Pipelining.pptxUnit - 5 Pipelining.pptx
Unit - 5 Pipelining.pptx
 
secondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OSsecondary storage structure :disk arm scheduling in OS
secondary storage structure :disk arm scheduling in OS
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Module5 secondary storage
Module5 secondary storageModule5 secondary storage
Module5 secondary storage
 
Pipeline and Vector Processing Computer Org. Architecture.pptx
Pipeline and Vector Processing Computer Org. Architecture.pptxPipeline and Vector Processing Computer Org. Architecture.pptx
Pipeline and Vector Processing Computer Org. Architecture.pptx
 
Os7
Os7Os7
Os7
 
I/O structure slide by Rajalakshmi SKC
I/O structure slide by Rajalakshmi SKCI/O structure slide by Rajalakshmi SKC
I/O structure slide by Rajalakshmi SKC
 
cs1311lecture25wdl.ppt
cs1311lecture25wdl.pptcs1311lecture25wdl.ppt
cs1311lecture25wdl.ppt
 

Recently uploaded

Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 

Recently uploaded (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 

Disk scheduling

  • 1. Disk Scheduling CS 537 - Introduction to Operating Systems
  • 2. Disk Scheduling • The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk bandwidth. • Access time has two major components Seek time is the time for the disk are to move the heads to • the cylinder containing the desired sector. • Rotational latency is the additional time waiting for the disk • to rotate the desired sector to the disk head. • Minimize seek time • Seek time ≈ seek distance • Disk bandwidth is the total number of bytes transferred, • divided by the total time between the first request for • service and the completion of the last transfer.
  • 3. Disk Scheduling • Recall, statistical average seek time is 9 ms – randomly accessing all over disk • Multiple requests to disk will arrive while one is being serviced • Can drastically reduce average seek time by intelligent scheduling accesses
  • 4. Elevator Algorithm • Similar to SSTF • One major difference – next job scheduled is closest to current job but in one particular direction – all jobs in other direction are put at the end of the list • Similar to an elevator – it goes up first and then comes back down
  • 5. Elevator Algorithm •Reference String: 5, 35, 2, 14, 12, 21, 3, 9, 22, 20 head 5912142021223532 tail •Calculation of total seek distance: 4 + 3 + 2 + 6 + 1 + 1 + 13 + 32 + 1 = 63 43261113321
  • 6. A. Frank - P. Weisberg Elevator Algorithms C-LookC-Scan Scan Look Go until the last request Go until the last cylinder Service in only one direction Service both directions Direction Go until • Algorithms based on the common elevator principle. • Four combinations of Elevator algorithms: – Service in both directions or in only one direction. – Go until last cylinder or until last I/O request.
  • 7. Elevator Algorithm • Avoids starvation • Provides very good performance • Still has one major issue – FAIRNESS • Jobs in the middle of the disk get serviced twice as much as jobs at the ends
  • 8. One-Way Elevator Algorithm • Exactly like elevator algorithm except scheduling is done in only one direction – for example, elevator always goes “up” • This will require one long seek after finished going up – have to go back to the beginning • This is okay because one long seek doesn’t take very long – IBM disk: 15 ms from one end to the other • This long seek is done infrequently
  • 9. One-Way Elevator Algorithm •Reference String: 5, 35, 2, 14, 12, 21, 3, 9, 22, 20 head 5912142021223523 tail •Calculation of total seek distance: 4 + 3 + 2 + 6 + 1 + 1 + 13 + 33 + 1 = 64 43261113331
  • 10. One-Way Elevator Algorithm •Reference String: 5, 35, 2, 14, 12, 21, 3, 9, 22, 20 head 5912142021223523 tail •Calculation of total seek distance: 4 + 3 + 2 + 6 + 1 + 1 + 13 + 33 + 1 = 64 43261113331