SlideShare a Scribd company logo
Al_Nahrain University
COLLEGE OF INFORMATION
ENGINEERING
SYSTEM DEPARTMENT
Disk Scheduling Algorithms
ALI Jawad
Abstract
This presentation starts from the structure of a disk ,the hardware activities involved in the data
retrieval from direct attached storage device and Working Principle, then introduces and
compares multiple Disk Scheduling algorithms such as.
 First Come First Serve (FCFS).
 Shortest Seek Time First (SSTF).
 SCAN Scheduling Algorithm.
 LOOK Scheduling Algorithm.
There are others algorithms such as a
Circular SCAN (C-SCAN) Algorithm
and C-LOOK Scheduling Algorithm
I will take it in order these four algorithms to show the differences between these algorithms,
serial examples are provided and concluded with analysis in the end.
ALI Jawad
The disk consists of
 1- A platter, made of metal or plastic.
 2- a magnet coating on it.
 3- Flat circular shape (cylinder).
 4- the spindle keeps the platters in position.
 5- the read/write arm controls the movement of the read/write heads.
Disk Structure
ALI Jawad
Working Principle
 The drive motor spins disk at high speed.
 The read/write arm swings read/write head
back and forth across platter.
 Central spindle allows platter to rotate at high
speed.
 Magnetic platter is stored Information on the
track in binary form.
ALI Jawad
Disk Scheduling Algorithms
 Disk scheduling algorithms are used to allocate the services to the I/O
requests on the disk. Since seeking disk requests is time consuming, disk
scheduling algorithms try to minimize this latency.
 The objective of using these algorithms is keeping Head movements to
the amount as possible. The less the head to move, the faster the seek
time will be. To see how it works, the different disk scheduling algorithms
will be discussed and examples are also provided for better understanding
on these different algorithms.
ALI Jawad
1-First Come First Serve (FCFS)
 It is the simplest form of disk scheduling algorithms. The I/O requests are served or
processes according to their arrival. The request arrives first will be accessed and
served first.
Example:
Given the following track requests in the disk queue, compute for the Total Head
Movement2 (THM) of the read/write head:
95, 180, 34, 119, 11, 123, 62, 64
Consider that the read/write head is positioned at location 50. Prior to this track
location 199 was serviced. Show the total head movement for a 200 track disk (0-199).
ALI Jawad
Solution:
Total Head Movement Computation:
(THM) = (180 - 50) + (180-34) + (119-34) +
(119-11) + (123-11) + (123-62) + (64-62)
= 130 + 146 + 85 + 108 + 112 + 61 + 2
(THM) = 644 tracks
Assuming a seek rate of 5 milliseconds is
given, we compute for the seek time using
the formula:
Seek Time = THM * Seek rate = 644 * 5 ms
Seek Time = 3,220 ms
50
95
180
34
119
11
123
62
64
0
20
40
60
80
100
120
140
160
180
200
0 1 2 3 4 5 6 7 8 9
Time
Disk Scheduling Algorithms : FCFS
95, 180, 34, 119, 11, 123, 62, 64
ALI Jawad
First Come First Serve (FCFS)
Conclusion
There are some requests that are far from the current location of the R/W head which causes the
access arm to travel from innermost to the outermost tracks of the disk or vice versa.
In this example, it had a total of 644 tracks and a seek time of 3,220 milliseconds. Based on the
result, this algorithm produced higher seek rate since it follows the arrival of the track requests.
ALI Jawad
2-Shortest Seek Time First (SSTF)
This algorithm is based on the idea that the R/W head should proceed to the track that
is closest to its current position.
The process would continue until all the track requests are taken care of.
Using the same sets of example in FCFS the solution are as follows:
Example:
Given the following track requests in the disk queue, compute for the Total Head
Movement2 (THM) of the read/write head:
95, 180, 34, 119, 11, 123, 62, 64
Consider that the read/write head is positioned at location 50. Prior to this track
location 199 was serviced. Show the total head movement for a 200 track disk (0-199).
ALI Jawad
Solution:
 (THM) = 12+2+30+23+84+24+4+57 =
 (THM) = 236 tracks
 Seek Time = THM * Seek rate = 236 * 5ms
 Seek Time = 1,180 ms
Conclusion
In this algorithm, request is serviced according to
the next shortest distance. Starting at 50, the next
shortest distance would be 62 instead of 34 since it
is only 12 tracks away from 62 and 16 tracks away
from 34. The process would continue up to the last
track request. There are a total of 236 tracks and a
seek time of 1,180 ms, which seems to be a better
service compared with FCFS
0
20
40
60
80
100
120
140
160
180
200
0 1 2 3 4 5 6 7 8 9
Time
Disk Scheduling Algorithm : SSTF
95, 180, 34, 119, 11, 123, 62, 64
ALI Jawad
 This algorithm is performed by moving the R/W head back-and-forth to
the innermost and outermost track. As it scans the tracks from end to end
Using the same sets of example In FCFS the solution are as follows:
Example:
Given the following track requests in the disk queue, compute for the Total
Head Movement2 (THM) of the read/write head:
95, 180, 34, 119, 11, 123, 62, 64
3-SCAN Scheduling Algorithm
ALI Jawad
Solution:
 (THM) = (50-0) + (180-0) = 50 + 180
 (THM) = 230
 Seek Time = THM * Seek rate = 230 * 5ms
 Seek Time = 1,150 ms
Conclusion
This algorithm works like an elevator does. In
the algorithm example, it scans down towards
the nearest end and when it reached the
bottom it scans up servicing the requests that
it did not get going down. If a request comes
in after it has been scanned, it will not be
serviced until the process comes back down
or moves back up. This process moved a total
of 230 tracks and a seek time of 1,150. This is
optimal than the previous algorithm.
50
34
11
0
199
180
123 119
95
64 62
0
50
100
150
200
250
0 2 4 6 8 10 12
Time
Disk Scheduling Algorithms : SCAN
95, 180, 34, 119, 11, 123, 62, 64
ALI Jawad
4-LOOK Scheduling Algorithm
 This algorithm is similar to SCAN algorithm except for the end-to-end
reach of each sweep. The R/W head is only tasked to go the farthest
location in need of servicing. This is also a directional algorithm, as soon as
it is done with the last request in one direction it then sweeps in the other
direction.
Using the same sets of example in FCFS the solution are as follows:
Example:
Given the following track requests in the disk queue, compute for the Total
Head Movement2 (THM) of the read/write head:
95, 180, 34, 119, 11, 123, 62, 64
ALI Jawad
Solution:
 (THM) = (50-11) + (180-11) = 39 + 169
 (THM) = 208 tracks
 Seek Time = THM * Seek rate = 208 * 5ms
 Seek Time = 1,040 ms
Conclusion
This algorithm has a result of 208 tracks and a
seek rate of 1,040 milliseconds. This algorithm is
better than the previous algorithm.
50
34
11
180
123
119
95
64
62
0
20
40
60
80
100
120
140
160
180
200
0 1 2 3 4 5 6 7 8 9
Time
Disk Scheduling Algorithm : look
95, 180, 34, 119, 11, 123, 62, 64
ALI Jawad
Summary
Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk and improve its
performance. Different qualities exists on these algorithms based on the given examples and computations. Several
disadvantages also occur on these different algorithm and these are:
* Before the analysis we must know when selecting a Disk Scheduling algorithm, performance depends on the number and
types of requests.
 The FCFS performs operations in order requested. No reordering of work queue since it processed disk requests
according to its arrival. There is no starvation and all the requests are serviced but it doesn’t provide fastest
service.
 The Shortest Seek Time First (SSTF) selects the disk I/O request that requires the least movement of the disk
access arm from its current position regardless of direction. It also reduces the seek time compared to FCFS but in
this algorithm, I/O requests at the edges of the disk surface may get starved.
 The SCAN algorithm go from the outside to the inside servicing requests and then back from the outside to the
inside servicing requests. It also reduces variance compared to SSTF.
 In LOOK scheduling algorithm, the arm goes only as far as the final request in each direction. The direction
reverses immediately, without going all the way to the end of the disk.
ALI Jawad
ALI Jawad

More Related Content

What's hot

Process synchronization
Process synchronizationProcess synchronization
Process synchronization
Syed Hassan Ali
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
NEERAJ BAGHEL
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
3.9 external sorting
3.9 external sorting3.9 external sorting
3.9 external sorting
Krish_ver2
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
Talha Shaikh
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3
Md. Mahedi Mahfuj
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
Khushboo Jain
 
Monitors
MonitorsMonitors
Monitors
Mohd Arif
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
Vaibhav Khanna
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
Rajapriya82
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
Dr. Jasmine Beulah Gnanadurai
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
LECO9
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Dhaval Sakhiya
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
Mukesh Chinta
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
Ra'Fat Al-Msie'deen
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
sgpraju
 
Operating system 11 system calls
Operating system 11 system callsOperating system 11 system calls
Operating system 11 system calls
Vaibhav Khanna
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
Sanad Bhowmik
 

What's hot (20)

Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
3.9 external sorting
3.9 external sorting3.9 external sorting
3.9 external sorting
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
 
Parallel computing chapter 3
Parallel computing chapter 3Parallel computing chapter 3
Parallel computing chapter 3
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Monitors
MonitorsMonitors
Monitors
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
 
INTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptxINTER PROCESS COMMUNICATION (IPC).pptx
INTER PROCESS COMMUNICATION (IPC).pptx
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
 
Operating system 11 system calls
Operating system 11 system callsOperating system 11 system calls
Operating system 11 system calls
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
 

Similar to Disk Scheduling Algorithms

Disk Scheduling In Operating System.pptx
Disk Scheduling In Operating System.pptxDisk Scheduling In Operating System.pptx
Disk Scheduling In Operating System.pptx
Maharshi Dayanand University Rohtak
 
Device Management
Device ManagementDevice Management
Device Management
Kabarak University
 
Gantt chat for cylenders
Gantt chat for cylendersGantt chat for cylenders
Gantt chat for cylenders
Tyronne Ronne
 
I/O buffering & disk scheduling
I/O buffering & disk schedulingI/O buffering & disk scheduling
I/O buffering & disk scheduling
Rushabh Shah
 
I/O Management
I/O ManagementI/O Management
I/O Management
Ann Rafanan
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
Aayush Patel
 
Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...
Adarsh Kr Sinha
 
Placement AlgorithmIt decides which program to load into the memo.pdf
Placement AlgorithmIt decides which program to load into the memo.pdfPlacement AlgorithmIt decides which program to load into the memo.pdf
Placement AlgorithmIt decides which program to load into the memo.pdf
aryan9007
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
Paresh Parmar
 
7 disk managment
7 disk managment7 disk managment
7 disk managment
ashishkhatu1
 
Mass storage structure
Mass storage structureMass storage structure
Mass storage structure
Robert Antony
 
381 ccs chapter8_updated(1)
381 ccs chapter8_updated(1)381 ccs chapter8_updated(1)
381 ccs chapter8_updated(1)
Rabie Masoud
 
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
RAJALAKSHMI RADHAKRISHNAN
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithm
Binal Parekh
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
Geetha Kannan
 
Ch5 answers
Ch5 answersCh5 answers
Ch5 answers
Hailemariam brhane
 
Os(18 cs43) module5
Os(18 cs43) module5Os(18 cs43) module5
Os(18 cs43) module5
Shivanand Manjaragi
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
A29ShirleyDhawadkar
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
Nazir Ahmed
 

Similar to Disk Scheduling Algorithms (20)

Disk Scheduling In Operating System.pptx
Disk Scheduling In Operating System.pptxDisk Scheduling In Operating System.pptx
Disk Scheduling In Operating System.pptx
 
Device Management
Device ManagementDevice Management
Device Management
 
Gantt chat for cylenders
Gantt chat for cylendersGantt chat for cylenders
Gantt chat for cylenders
 
I/O buffering & disk scheduling
I/O buffering & disk schedulingI/O buffering & disk scheduling
I/O buffering & disk scheduling
 
I/O Management
I/O ManagementI/O Management
I/O Management
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
 
Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...Explained Disk Scheduling Algo ...
Explained Disk Scheduling Algo ...
 
Placement AlgorithmIt decides which program to load into the memo.pdf
Placement AlgorithmIt decides which program to load into the memo.pdfPlacement AlgorithmIt decides which program to load into the memo.pdf
Placement AlgorithmIt decides which program to load into the memo.pdf
 
Disk scheduling algorithms
Disk scheduling algorithms Disk scheduling algorithms
Disk scheduling algorithms
 
7 disk managment
7 disk managment7 disk managment
7 disk managment
 
Mass storage structure
Mass storage structureMass storage structure
Mass storage structure
 
381 ccs chapter8_updated(1)
381 ccs chapter8_updated(1)381 ccs chapter8_updated(1)
381 ccs chapter8_updated(1)
 
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
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithm
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Ch5 answers
Ch5 answersCh5 answers
Ch5 answers
 
Os(18 cs43) module5
Os(18 cs43) module5Os(18 cs43) module5
Os(18 cs43) module5
 
Disk Scheduling
Disk SchedulingDisk Scheduling
Disk Scheduling
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 

Recently uploaded

Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 

Recently uploaded (20)

Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 

Disk Scheduling Algorithms

  • 1. Al_Nahrain University COLLEGE OF INFORMATION ENGINEERING SYSTEM DEPARTMENT
  • 3. Abstract This presentation starts from the structure of a disk ,the hardware activities involved in the data retrieval from direct attached storage device and Working Principle, then introduces and compares multiple Disk Scheduling algorithms such as.  First Come First Serve (FCFS).  Shortest Seek Time First (SSTF).  SCAN Scheduling Algorithm.  LOOK Scheduling Algorithm. There are others algorithms such as a Circular SCAN (C-SCAN) Algorithm and C-LOOK Scheduling Algorithm I will take it in order these four algorithms to show the differences between these algorithms, serial examples are provided and concluded with analysis in the end. ALI Jawad
  • 4. The disk consists of  1- A platter, made of metal or plastic.  2- a magnet coating on it.  3- Flat circular shape (cylinder).  4- the spindle keeps the platters in position.  5- the read/write arm controls the movement of the read/write heads. Disk Structure ALI Jawad
  • 5. Working Principle  The drive motor spins disk at high speed.  The read/write arm swings read/write head back and forth across platter.  Central spindle allows platter to rotate at high speed.  Magnetic platter is stored Information on the track in binary form. ALI Jawad
  • 6. Disk Scheduling Algorithms  Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk. Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this latency.  The objective of using these algorithms is keeping Head movements to the amount as possible. The less the head to move, the faster the seek time will be. To see how it works, the different disk scheduling algorithms will be discussed and examples are also provided for better understanding on these different algorithms. ALI Jawad
  • 7. 1-First Come First Serve (FCFS)  It is the simplest form of disk scheduling algorithms. The I/O requests are served or processes according to their arrival. The request arrives first will be accessed and served first. Example: Given the following track requests in the disk queue, compute for the Total Head Movement2 (THM) of the read/write head: 95, 180, 34, 119, 11, 123, 62, 64 Consider that the read/write head is positioned at location 50. Prior to this track location 199 was serviced. Show the total head movement for a 200 track disk (0-199). ALI Jawad
  • 8. Solution: Total Head Movement Computation: (THM) = (180 - 50) + (180-34) + (119-34) + (119-11) + (123-11) + (123-62) + (64-62) = 130 + 146 + 85 + 108 + 112 + 61 + 2 (THM) = 644 tracks Assuming a seek rate of 5 milliseconds is given, we compute for the seek time using the formula: Seek Time = THM * Seek rate = 644 * 5 ms Seek Time = 3,220 ms 50 95 180 34 119 11 123 62 64 0 20 40 60 80 100 120 140 160 180 200 0 1 2 3 4 5 6 7 8 9 Time Disk Scheduling Algorithms : FCFS 95, 180, 34, 119, 11, 123, 62, 64 ALI Jawad
  • 9. First Come First Serve (FCFS) Conclusion There are some requests that are far from the current location of the R/W head which causes the access arm to travel from innermost to the outermost tracks of the disk or vice versa. In this example, it had a total of 644 tracks and a seek time of 3,220 milliseconds. Based on the result, this algorithm produced higher seek rate since it follows the arrival of the track requests. ALI Jawad
  • 10. 2-Shortest Seek Time First (SSTF) This algorithm is based on the idea that the R/W head should proceed to the track that is closest to its current position. The process would continue until all the track requests are taken care of. Using the same sets of example in FCFS the solution are as follows: Example: Given the following track requests in the disk queue, compute for the Total Head Movement2 (THM) of the read/write head: 95, 180, 34, 119, 11, 123, 62, 64 Consider that the read/write head is positioned at location 50. Prior to this track location 199 was serviced. Show the total head movement for a 200 track disk (0-199). ALI Jawad
  • 11. Solution:  (THM) = 12+2+30+23+84+24+4+57 =  (THM) = 236 tracks  Seek Time = THM * Seek rate = 236 * 5ms  Seek Time = 1,180 ms Conclusion In this algorithm, request is serviced according to the next shortest distance. Starting at 50, the next shortest distance would be 62 instead of 34 since it is only 12 tracks away from 62 and 16 tracks away from 34. The process would continue up to the last track request. There are a total of 236 tracks and a seek time of 1,180 ms, which seems to be a better service compared with FCFS 0 20 40 60 80 100 120 140 160 180 200 0 1 2 3 4 5 6 7 8 9 Time Disk Scheduling Algorithm : SSTF 95, 180, 34, 119, 11, 123, 62, 64 ALI Jawad
  • 12.  This algorithm is performed by moving the R/W head back-and-forth to the innermost and outermost track. As it scans the tracks from end to end Using the same sets of example In FCFS the solution are as follows: Example: Given the following track requests in the disk queue, compute for the Total Head Movement2 (THM) of the read/write head: 95, 180, 34, 119, 11, 123, 62, 64 3-SCAN Scheduling Algorithm ALI Jawad
  • 13. Solution:  (THM) = (50-0) + (180-0) = 50 + 180  (THM) = 230  Seek Time = THM * Seek rate = 230 * 5ms  Seek Time = 1,150 ms Conclusion This algorithm works like an elevator does. In the algorithm example, it scans down towards the nearest end and when it reached the bottom it scans up servicing the requests that it did not get going down. If a request comes in after it has been scanned, it will not be serviced until the process comes back down or moves back up. This process moved a total of 230 tracks and a seek time of 1,150. This is optimal than the previous algorithm. 50 34 11 0 199 180 123 119 95 64 62 0 50 100 150 200 250 0 2 4 6 8 10 12 Time Disk Scheduling Algorithms : SCAN 95, 180, 34, 119, 11, 123, 62, 64 ALI Jawad
  • 14. 4-LOOK Scheduling Algorithm  This algorithm is similar to SCAN algorithm except for the end-to-end reach of each sweep. The R/W head is only tasked to go the farthest location in need of servicing. This is also a directional algorithm, as soon as it is done with the last request in one direction it then sweeps in the other direction. Using the same sets of example in FCFS the solution are as follows: Example: Given the following track requests in the disk queue, compute for the Total Head Movement2 (THM) of the read/write head: 95, 180, 34, 119, 11, 123, 62, 64 ALI Jawad
  • 15. Solution:  (THM) = (50-11) + (180-11) = 39 + 169  (THM) = 208 tracks  Seek Time = THM * Seek rate = 208 * 5ms  Seek Time = 1,040 ms Conclusion This algorithm has a result of 208 tracks and a seek rate of 1,040 milliseconds. This algorithm is better than the previous algorithm. 50 34 11 180 123 119 95 64 62 0 20 40 60 80 100 120 140 160 180 200 0 1 2 3 4 5 6 7 8 9 Time Disk Scheduling Algorithm : look 95, 180, 34, 119, 11, 123, 62, 64 ALI Jawad
  • 16. Summary Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk and improve its performance. Different qualities exists on these algorithms based on the given examples and computations. Several disadvantages also occur on these different algorithm and these are: * Before the analysis we must know when selecting a Disk Scheduling algorithm, performance depends on the number and types of requests.  The FCFS performs operations in order requested. No reordering of work queue since it processed disk requests according to its arrival. There is no starvation and all the requests are serviced but it doesn’t provide fastest service.  The Shortest Seek Time First (SSTF) selects the disk I/O request that requires the least movement of the disk access arm from its current position regardless of direction. It also reduces the seek time compared to FCFS but in this algorithm, I/O requests at the edges of the disk surface may get starved.  The SCAN algorithm go from the outside to the inside servicing requests and then back from the outside to the inside servicing requests. It also reduces variance compared to SSTF.  In LOOK scheduling algorithm, the arm goes only as far as the final request in each direction. The direction reverses immediately, without going all the way to the end of the disk. ALI Jawad