Operating System: No One Cares What Operating System You Run As Long As It Stays Up
Operating System: No One Cares What Operating System You Run As Long As It Stays Up
Operating System: No One Cares What Operating System You Run As Long As It Stays Up
SYSTEM
No one cares what operating
system you run as long as it
stays up.
“No one cares what operating system you run as long as it stays up”.
DISK SCHEDULING
ALGORITHM
Group Members are:
Aima Eman (071)
Faiqa Asghar (081)
Hafiza Laiba Asghar (084)
Hafiza Shamza Hanif (085)
Zumar Imran (121)
AGENDA
INTRODUCTIONOf DISK SCHDUELING ALGORITHM
TYPES OF DISK SCHDUELING ALGORITHM
FCFS
SSTF
SCAN
CLOOK
Disk Scheduling Algorithm 4
SPINDLE
Read/Write HEAD
TRACKS
PLATTER
CYLINDER
Read/Write HEAD
SECTORS
Read/Write HEAD
Presentation title 7
Disk Scheduling Algorithm
8
SEEK TIME
Seek Time:
When anything is read or written to a disc drive, the read/write head of the disc
moves to the right position. The actual physical positioning of the read/write head
of the disc is called seeking. The time the read/write head of the disc takes to move
from one disk to another is called the seek time.
Example:
Consider a hard disk of the concentric circle called tracks, and you want to fetch
some data, but the read/write head is currently on track 1.
But the user request data that is present on Track 4. In this case, the read/write head
will move to track 4 and the time it will take to reach track 4 is the seek time.
Formula:
Seek Time = (Time to cross 1 cylinder(track))*(No of cylinder(track)
crossed)
RATIONAL LATENCY
Rotational Latency: The time read/write head is required to move
from the current to the requested sector.
After reached to the required sector the head done and check
following things:
Settle Time: Settle time is the time required by the read/write head
to stop vibrating.
Command Processing Time: It is the time required by the disk
device to process the command and establish a connection between
the various components of the disk device to read/write data. It is
due to the internal circuitry.
Formula:
Rotational latency = (Angle by which disk is rotated) /
(Angular Frequency)
Disk Scheduling Algorithm
11
TRANSFER TIME
Transfer Time: Transfer time is the time to transfer the data. It is the
time interval between the start of the transfer and the completion of the
transfer. It depends on the rotating speed of the disk and number of
bytes to be transferred.
Types:
Internal Transfer Rate: It is defined as the time required to move data
between the disk surface and the hard disk cache.
External Transfer Rate: It is defined as the time required to move data
between the hard disk cache and the system.
Formula: T=b/rN
T= Transfer time, b= number of bytes to be transferred, N is no. of
bytes on a track and r is rotational speed
Disk Access Time: We always access disk on the basis of their seek
time or rotational time or transfer time. So, the formula of DAT is..
Disk Access Time = Seek Time + Rotational Latency + Transfer
Time
FCFS IN DISK SCHEDULING
Presented By: Faiqa Asghar (2025110081)
Disk Scheduling Algorithm 13
EXAMPLE
Input:
Request sequence = {176, 79, 34, 60, 92, 11, 41, 114}
Initial head position = 50
Disk Scheduling Algorithm 15
SOLUTION
Seek Sequence is: {176, 79,34,60,92,11,41,114}
=(176-50)+(176-79)+(79-34)+(60-34)+(92-60)+(92-11)+(41-
11)+(114-41) = 510
Total number of seek operations = 510
Average waiting time: 510/8= 63.75
Disk Scheduling Algorithm 16
Disk Scheduling Algorithm 17
18
ADVANTAGES DISADVANTAGES
EXAMPLE
Request sequence : {176, 79, 34, 60, 92, 11, 41, 114}
Initial head position = 50
The following chart shows the sequence in which requested tracks are serviced
using SSTF=
Presentation title 22
SOLUTION
The order in which requests are served is:
{41,34,11,60,79,92,114,176}
ADVANTAGES DISADVANTAGES
SCAN/ELEVATOR ALGORITHM
The scan is a disk scheduling algorithm that serves
requests generated by memory management unit.
It is also called an elevator algorithm.
In this algorithm read and write head has to move in
one direction and fulfill all the requests until we
move to the end of the disk.
In this algorithm, the direction matters to serve
requests.
Presentation title 29
EXAMPLE
DIRECTION TOWARDS SMALLER VALUE:
Request sequence = {176, 79, 34, 60, 92, 11, 41, 114}
Initial head position = 50
Presentation title 30
SOLUTION
The order in which requests are served is:
{41,34,11,60,79,92,114,176}
PROGRAM
Presentation title 36
37
ADVANTAGES DISADVANTAGES
Total seek count: (60 – 50) + (79 – 60) + (92 – 79) + (114 – 92)
+ (176 – 114) + (176 – 11) + (34 – 11) + (41 – 34) = 321
PROGRAM
Presentation title 43
Presentation title 44
Presentation title 45
46
ADVANTAGE DISADVANTAGE
COMPARISON
Algorithm Seek time
FCFS 510
SSTF 204
SCAN 226
C-LOOK 331
THANK YOU