Open In App

Seek Time in OS

Seek Time is one of the key components of Disk Scheduling, Before going to Seek Time, let’s first discuss Disk Scheduling. Disk Scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O Scheduling. Multiple I/O requests may arrive by different processes and only one I/O request can be served at a time by the disk controller. Thus other I/O requests need to wait in the waiting queue and need to be scheduled.

What is Seek Time?

A disk is divided into many circular tracks. Seek Time is defined as the time required by the read/write head to move from one track to another. Example, Consider the following diagram, the read/write head is currently on track 1.



Now, on the next read/write request, we may want to read data from Track 4, in this case, our read/write head will move to Track 4. The time it will take to reach track 4 is the seek time.



Important Points Regarding Seek Time

Seek Time = (Time to cross 1 cylinder(track))*(No of cylinder(track) crossed)

Example

Lets look into FCFS Disk scheduling algorithm to learn more about seek time

FCFS (First Come First Serve) is the simplest of all Disk Scheduling Algorithms. In FCFS, the requests are addressed in the order they arrive in the disk queue.

Suppose the order of request is- (82,170,43,140,24,16,190)

And current position of Read/Write head is: 50

So, total overhead movement (total distance covered by the disk arm) =

(82-50)+(170-82)+(170-43)+(140-43)+(140-24)+(24-16)+(190-16) =642

Lets say time to cross 1 track is 1 second

Seek Time = 1 second * 642 track movements

Seek time= 642 s

Gate Question

Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is _________. (A) 14020 (B) 14000 (C) 25030 (D) 15000 [GATE CS 2015]

Answer: (A)

Explanation

Seek time (given) = 4ms

RPM = 10000 rotation in 1 min [60 sec]

So, 1 rotation will be =60/10000 =6ms [rotation speed]

Rotation latency= 1/2 * 6ms=3ms

# To access a file,

total time includes =seek time + rot. latency +transfer time

To calc. transfer time, find transfer rate

Transfer rate = bytes on track /rotation speed

so, transfer rate = 600*512/6ms =51200 B/ms

transfer time= total bytes to be transferred/ transfer rate

so, Transfer time =2000*512/51200 = 20ms

Given as each sector requires seek tim + rot. latency

= 4ms+3ms =7ms

Total 2000 sector takes = 2000*7 ms =14000 ms

To read entire file ,total time = 14000 + 20(transfer time)

= 14020 ms

Frequently Asked Questions on Seek Time – FAQs

What is seek time in the context of operating systems?

A disk is divided into many circular tracks. Seek Time is defined as the time required by the read/write head to move from one track to another

How does seek time impact the overall performance of a disk system?

Lower seek times result in faster data access, enhancing the efficiency of input and output operations.

What factors contribute to seek time?

Seek time is influenced by various factors, including the mechanical properties of the disk drive, the distance the arm must travel, and the speed at which the arm can move.

Are there strategies or algorithms to optimize seek time?

Yes, disk scheduling algorithms like FCFS, SCAN, C-SCAN, C-LOOK and LOOK are designed to minimize seek time.

Article Tags :