Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[In C++] Theoretically, the disk seek time is proportional to the square root of the distance the /O head travels from its current position to

[In C++]

image text in transcribed

Theoretically, the disk seek time is proportional to the square root of the distance the /O head travels from its current position to some destination position: TntTxo. A more accurate seek time model is the following exponential model t c(x-1) lsrsr Quantum Atlas III parameters: xmax-8057 cyl, C-9. I GB, N-7200 rpm, x*= 1686, t-I,5455ms, c-0.3197 ms, r-0.3868 1-r All operating systems provide optimizing algorithms that minimize the movement of the I/O mechanism. The simplest such algorithm is the shortest seek time first (SSTF) where the I/O mechanism always serves the request that is closest to the current position of the I/O head. If we have only one request in the disk queue then there is no chance to optimize the movement of the mechanism and the mechanism moves in a way that makes the average distance equal to the 1/3 of the maximum distance. However, if the disk queue contains n>1 service requests, then it is possible to optimize (i.e. to minimize movements of the TO mechanism). The optimization algorithm is activated before each seek operation. This means that in the case of high load disk performance is better than in the case of low load. In other words, disk is a load-dependent server In this homework we want to study the average seek time for Quantum Atlas III as a function of the disk queue length. This is a strictly decreasing function Sd(Q), where Q is the number of jobs in the disk queue. Write a simulator program for computing Sd(Q) as follows 1. Make and array dq of Q components that represents the disk queue 2. Initialize dq with Q uniformly distributed random numbers that represent cylinders where the I/O head has to move Generate an initial position of the I/O mechanism as a random value X. In each simulation step move the head to the closest position. After the head moves to the position dq[k] the new position will be X-dq[k], and the component dq[k] has to be replaced by a new random value. Compute the seek distance and the seek time Compute the average seek distance and the average seek time for at least 10000 disk accesses Plot the average seek distance and the average seek time for Q-1,2,...,20 3. 4. 5. 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Define Conventional Marketing.

Answered: 1 week ago

Question

Define Synchro Marketing.

Answered: 1 week ago

Question

Define marketing concepts.

Answered: 1 week ago

Question

1 what does yellow colour on the map represent?

Answered: 1 week ago