ArticleslgStudy

computer science

Shortest seek first

Shortest seek first is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Shortest seek first rather than just read about it. In short: Shortest seek first (or shortest seek time first) is a secondary storage scheduling algorithm to determine the motion of the disk read-and-write head in servicing read and write requests. An operating system using shortest seek first puts requests for data from the drive into a queue, and services them in order of how long it would take the drive to physically position its drive head over the correct cylinder and se…

Shortest seek first — main illustration
Shortest seek first — illustration

Key takeaways

  • Shortest seek first belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Shortest seek first to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Shortest seek first from memory before moving on to harder problems.

Reference excerpt

Shortest seek first (or shortest seek time first) is a secondary storage scheduling algorithm to determine the motion of the disk read-and-write head in servicing read and write requests. An operating system using shortest seek first puts requests for data from the drive into a queue, and services them in order of how long it would take the drive to physically position its drive head over the correct cylinder and sector to read the data. This algorithm prioritizes requests for data that would take less time to handle, which is quicker than handling the requests in the order they are received. However, many requests for data that are physically around the same region in the hard drive will starve requests that are further away.

Algorithm A basic description of the shortest seek first algorithm is as follows:

Create a priority queue of unserviced requests. The priority queue is ordered such that requests with a lower distance between the sector and cylinder currently under the head and the sector and cylinder of the request will be serviced first. While the priority queue is not empty, process the first request in the queue.

Description

Magnetic disk storage

The shortest seek first algorithm targets hard disk drives (HDD) featuring magnetic disks. In an HDD, magnetic disks are arranged in a stack, like a stack of CDs, which have information recorded onto them using a magnet. Data is written to the disks and read by a series of heads, attached to actuator arms, which sit in between and just slightly above the surface of each disk. The arm system physically moves the heads across the disks to access data. Each disk is subsequently divided into circular tracks, which are themselves divided into sectors. For example, when reading data, the arms physically extend out to a particular cylinder, in what is called the seek time, while the disks rotate beneath them. The time it takes for the disk to rotate to the desired sector is called the "rotational latency."

Implementation Shortest seek first is a specific case of the shortest job next scheduling algorithm. It is motivated by the reasonable assumption that time can be saved by prioritizing requests in a way that minimizes the time spent moving the actuator arms. The drive maintains an incoming buffer of requests, and tied with each request is the cylinder number of the request. Lower cylinder numbers indicate the cylinder is closer to the spindle, while higher numbers indicate the cylinder is further away. The shortest seek first algorithm determines which request is closest to the current position of the head, and services that request next.

Analysis Shortest seek first represents an improvement over the First come, first served algorithm by prioritizing requests that involve less actuator arm movement. However, since the buffer is always getting new requests, these can skew the service time of requests that may be furthest away from the disk head's current location, if the new requests are all close to the current location; in fact, starvation may result, with the faraway requests never being able to make progress.

See also Elevator algorithm

References

Bibliography Silberschatz, Abraham; Galvin, Peter Baer; Gagne, Greg (2005). Operating System Concepts (7th ed.). John Wiley & Sons. ISBN 0471694665.

Worked examples

Example 1 — a first encounter with Shortest seek first

Start with the simplest possible case. Write down what Shortest seek first claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Shortest seek first before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Shortest seek first ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Shortest seek first

In research
Shortest seek first appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Shortest seek first in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Shortest seek first is common in secondary-school and first-year university syllabi. It links to neighbouring topics Disk scheduling algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Shortest seek first outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Shortest seek first” →

How to study Shortest seek first in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Shortest seek first means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Shortest seek first out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Shortest seek first in simple terms?

Shortest seek first (or shortest seek time first) is a secondary storage scheduling algorithm to determine the motion of the disk read-and-write head in servicing read and write requests. An operating system using shortest seek first puts requests for data from the drive into a queue, and services…

Why does Shortest seek first matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Shortest seek first?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Shortest seek first.

Tags

  • Disk scheduling algorithms

Keep exploring