Question

In: Computer Science

Suppose the following disk request sequence (track numbers) for a disk with 200 tracks is given:...

Suppose the following disk request sequence (track numbers) for a disk with 200 tracks is given: 23, 89, 132, 42, 97, 35, 187 Assume that the initial position of the R/W head is on track 100. Draw the diagrams for arm movement for the seek strategies given below. Calculate the total and average number of tracks travelled and conclude which strategy performed best in the given scenario. Note: You can use pencil and paper method to draw, but you have to write your id on every pic included in the answer sheet. a) FCFS [3 Marks] b) SSTF [3 Marks] c) SCAN [3 Marks] d) C-SCAN [3 Marks] e) LOOK [3 Marks] f) C-LOOK

Solutions

Expert Solution

Answer

A) FCFS(First come firt serve)

In this method the disk head will move in order of the queue.

In this problem, the disk head will move from 100 to 23 because 23 is the first location in the queue.

The total track travelled=(100-23)+(89-23)+(132-89)+(132-42)+(89-42)+(89-23)+(187-35)= 541

Average track travelled=total track travelled / number of points =541 / 8=67.6

B)SSTF(Shortest seek time first)

In this method, the disk head will move to the next shortest distance location.

In this problem from 100, the disk head moved to 97 because that location has the least distance from the head(100)

The total track travelled=(100-23)+(132-23)+(187-132)+(100-97)+(97-89)+(89-42)+(42-35)+(35-23)+(132-23)+(187-132)=241

Average track travelled=241 / 8=30.1

C)SCAN

In this method, the disk head will move to left or right and visit all locations on that path and reach at end location(0 or 199) after that it will reverse the direction and move to the next location.

n this problem, The disk head moves to the right side and visit all location on that path and reaches at 199 and then reverse its direction and visit remaining locations.

The total track travelled=(132-100)+(187-132)+(199-187)+(199-97)+(97-89)+(89-42)+(42-35)+(35-23)=275

Average track travelled=275 / 8=34.3

D)C-SCAN

This method is the same as SCAN but the disk head will move to both extreme points( 0 and 199).

In this problem the disk head moves to the right side and reaches 199 on that path, it will visit all locations after that the disk head will reverse and move to 0 on that path it will visit all locations.

The total track travelled=(132-100)+(187-132)+(199-187)+(199-0)+(23-0)+(35-23)+(42-35)+(89-42)+(97-89)=395

Average track travelled=395 / 8=49.3

E)LOOK

In this method, there is a small modification from c scan. the disk head will only move up to the given last location (187 or 23) it will not touch extreme points.

The total track travelled=(132-100)+(187-132)+(187-97)+(97-89)+(89-42)+(42-35)+(35-23)= 251

Average track travelled=251 / 8=31.3

F)C-LOOK

In this method same as look but after visiting end location it will goes to the farest point in the opposite side

In this problem as you can see after reaching 187 the disk head move to 23.

The total track travelled=(132-100)+(187-132)+(187-23)+(35-23)+(42-35)+(89-42)+(97-89)=349

Average track travelled=349 / 8=43.6

Selecting best among this

SSTF(Shortest seek time first) is the best among them will less travel time (241)


Related Solutions

Suppose the following disk request sequence (track numbers) for a disk with 200 tracks is given:...
Suppose the following disk request sequence (track numbers) for a disk with 200 tracks is given: 23, 89, 132, 42, 97, 35, 187 Assume that the initial position of the R/W head is on track 100. Draw the diagrams for arm movement for the seek strategies given below. Calculate the total and average number of tracks travelled and conclude which strategy performed best in the given scenario. Note: You can use pencil and paper method to draw, but you have...
(a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence,...
(a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the two preceding ones: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 114, … etc. By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. We define Fib(0)=0,...
Given the following numbers in the given order, show the red black tree              100, 200,...
Given the following numbers in the given order, show the red black tree              100, 200, 150, 170, 165, 180, 220, 163, 164 Show the pre-order traversal of this red black tree while showing the color of each node in the pre-order traversal. Write (C++) the red black tree code and insert the above numbers. Show the screen shot of the pre-order traversal of the resulting tree. Distinguish the colors by writing a * next to the black color values....
Consider a single-platter disk with the following parameters: rotation speed: 7200 rpm; number of tracks on...
Consider a single-platter disk with the following parameters: rotation speed: 7200 rpm; number of tracks on one side of platter: 30,000; number of sectors per track: 600; seek time: one ms for every hundred tracks traversed. Let the disk receive a request to access a random sector on a random track and assume the disk head starts at track 0. a. What is the average seek time? b. What is the average rotational latency? c. What is the transfer time...
Please use C++ 1. A Sequence of numbers and a sum is given as input. List...
Please use C++ 1. A Sequence of numbers and a sum is given as input. List all combinations of numbers that can add upto the given Sum. User input:- Enter numbers: -   1, 3,7,9,11 Enter a sum :- 20 Output: 11+9 = 20 1+3+7+9 = 20 2. Print absolute prime numbers between a given range:- Enter Range - 2,99 For eg Prime numbers are:- Prime numbers ==> 2,3,5,7,11,13,17,19,23 Absolute Prime numbers ==> 2,3,5,7,11,23 3. Write an encoder and decoder program,...
Describe the following disk concepts or compo- nents. a. Platter and recording surface. b. Track. c....
Describe the following disk concepts or compo- nents. a. Platter and recording surface. b. Track. c. Cylinder. d. Read/write head. e. Access-arm mechanism.
E.C. 2. (10 pts.) Suppose that (sn) is a sequence of real numbers such that sn...
E.C. 2. (10 pts.) Suppose that (sn) is a sequence of real numbers such that sn ≥ 0 for all n ∈ N. (a) Show that the set of subsequential limits of S satisfies S ⊆ [0,∞) ∪ {+∞}. (b) Is it possible for S = [0,∞) ? (Hint: apply Theorem 11.9.) Legible handwriting is a must
Suppose that you are given the following information. Answer the following question: Labor force 200 million...
Suppose that you are given the following information. Answer the following question: Labor force 200 million Adults in the military 1 million Population below 16 50 million Employed adults 180 million Institutionalized adults 3 million Not in Labor force 40 million 1. What is the total population? ( show your work) 2. How many people are unemployed, and what is the unemployment rate? 3. what is the labor force participation rate?
python coding Suppose a list of positive numbers is given like the following list (remember this...
python coding Suppose a list of positive numbers is given like the following list (remember this is only an example and the list could be any list of positive numbers) exampleList: 15 19 10 11 8 7 3 3 1 We would like to know the “prime visibility” of each index of the list. The “prime visibility” of a given index shows how many numbers in the list with indexes lower than the given index are prime. For instance, in...
Suppose we have an array A that contains a prime numbers from 2 to 200 in...
Suppose we have an array A that contains a prime numbers from 2 to 200 in sorted order. How many items of the array A would the binary search algorithm have to examine before concluding that 60 is not in the array A? 30 200 100 6 2- Suppose we have an array that contains 182 village name. These names are sorted alphabetically. How many names would binary search algorithm examine to locate a particular name in the array, in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT