You are on page 1of 24

Non-volatile:

retains stored information without requiring power can access information stored quickly regardless of location

Random Access:

Magnetic data storage device Rotating platters on a spindle Uses read/write heads that float above the platters Data is stored on the surface of a platter. The surface of each platter is divided into

circular tracks (a single track is highlighted yellow below). Each track is divided into smaller pieces called sectors (a single sector is highlighted blue below).

The disk head is what reads from/writes to the hard disk

Total access time = seek time + rotational latency + data transfer time
Seek time the time that it takes to move

the read/write heads from one cylinder to another Rotational latency the time needed to wait for the head to rotate to the requested sector Data transfer time the time to read data from the disk or the time to write data to the disk

During runtime, input and output requests for tracks come from the processes. The OS must choose the order in which it serves these requests. Disk scheduling is the order in which the read/write head is moved across the platter to satisfy several input/output requests Disk scheduling affects the performance

The rotational delay and the data transfer time

will not change but the seek time can change, depending on the algorithm selected

Two objectives for disk scheduling algorithms:


Maximize the throughputthe average number of

requests satisfied per time unit Minimize the response timethe average time that a request must wait before it is satisfied

Types of Scheduling Algorithms:


First-Come, First-Served (FCFS) Shortest Seek Time First (SSTF) SCAN LOOK C-SCAN C-LOOK FSCAN

Simplest scheduling algorithm Completes seeks in the order in which they were requested by processes Does not give preference to distance from the disk head Is the most fair although can take longer because may require short tasks to wait for long tasks to finish and important jobs wait for unimportant jobs to complete Cannot guarantee a good response time

Selects the next request based on the position closest to the current head position Can save time because requires less head movement Can cause starvation to requests with positions further away from the current position because it will continue selecting positions close in proximity, regardless of order received

Moves the disk head from one end of the disk to the other and then returnseven if there are no requests If a request comes in for a position located at the opposite end, the disk head will continue moving in its current direction until it reaches the end of the disk Nicknamed the elevator algorithm because of its similarity to the behavior of an elevator

Similar to SCAN because it moves the disk head across the disk from one end to the other However, is different from SCAN because LOOK stops seeking when it has reached the last request in the current direction and turns around

Slightly faster seek times than SCAN Also called an elevator algorithm

This is a variation of the SCAN algorithm which restricts the scanning to a single direction
This restriction will reduce the amount of delay

Moves inward servicing requests until it reaches the innermost cylinder, stops servicing requests, moves back to the outermost cylinder and continues servicing

This is a variation of the LOOK algorithm which restricts the scanning to a single direction (like C-SCAN)
This restriction will reduce the amount of delay

Moves inward servicing requests until it reaches the innermost cylinder, stops servicing requests, moves back to the outermost request and continues servicing

FSCAN (Frozen SCAN) uses two queues for seeking. When a SCAN starts, the current requests are in the first queue, the second queue is empty. While scanning, any new requests received go into the second queue and wait for the first queue to complete.

The Disk Head Simulator is a Java application was written by Steven Robbins.

Steven Robbins works in the Department of Computer Science at the University of Texas at San Antonio. The Simulator was originally released in 2004.

The simulator was updated in 2007 The updated version removed the simulations for SCAN, LOOK, and FSCAN FCFS, SSTF, and C-LOOK Data Graphs (using new version of software):

What is the surface where the data is stored called?


A platter FCFS, SSTF, SCAN, LOOK, C-SCAN, C-LOOK,

Name the algorithms! There are SEVEN!


F-SCAN

Which algorithm can cause starvation? Which two algorithms are nicknamed elevator algorithms?
SCAN and LOOK Shortest Seek Time First (SSTF)

You might also like