Purchase Solution

Calculating Distance for Algorithms

Not what you're looking for?

Ask Custom Question

You will calculate the total distance that a disk arm moves to satisfy pending requests, for different disk scheduling algorithms.

Steps

1. Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4,999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in first-in-first-out (FIFO) order, is as follows:

92; 1,320; 879; 1,984; 1,023; 1,690; 1,123; 2,002; and 93

2. Calculate the total distance in cylinders starting from the current head position that the disk arm moves to satisfy all the pending requests for each of the following disk scheduling algorithms:

FCFS
SSTF
SCAN
LOOK
C-SCAN

Purchase this Solution

Solution Summary

This solution discusses calculations of distance for algorithms.

Solution Preview

If you do not already have it, I recommend an excellent book called "Operating System Concepts" by Silberschatz, Galvin, and Gagne.

FCFS: First Come First Serve
The simplest and easiest to implement, you just process the requests in the order that they came in: 92 1320 879 1984 1023 1690 1123 2002 93
Total movement: from 143 to 92, to 1320, to 879, to 1984... = 51 + 1228 + 441 + 1105 + 961 + 667 + 879 + 1909 = 7241

SSTF: Shortest Seek Time First
Always process the request that requires moving the head the least from the current position. ...

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

This quiz tests a student's knowledge about C++ operators.