Question

In: Computer Science

Problem 1 [50 pts] Consider a hard disk drive that has 5 double-sided platters, each surface...

Problem 1 [50 pts]

Consider a hard disk drive that has 5 double-sided platters, each surface has 1000 tracks, each track has 256 sectors of size 512 bytes. Each block (disk page) comprises of 8 sectors. The seek time between adjacent tracks in 1ms and the average seek time between two random tracks is 25ms. The disk rotates at a speed of 7200 rpm (revolutions per minute).

Let’s say, we have a file of size 1 MB and it contains 2048 equal-sized records.
1. What is the size of a block? How many records fit in a block? How many blocks are required to store the

entire file?
2. What is the capacity of each cylinder?

3. What is maximum time (worst case) to read two blocks from the disk (the blocks to be read are part of the same read request and no external factors affect the read latency)?

4. If the file is stored “sequentially”, how long will it take to read the whole file? Assume that for sequential writes data are written in adjacent tracks once a track is full.

5. If the blocks in the file are spread “randomly” across the disk, how long will it take to read the whole file?

Solutions

Expert Solution

Things given in the qn :

No of double sided platters ( 2 surfaces - upper surface and lower surface) = 5

Each surface contains 1000 tracks

Each track contains 256 sectors

Each sector contans 512 bytes

Each block contains 8 sectors => Block size = 8 * 512 = 4096 bytes

Seek time between adajacent tracks = 1 ms //Seek time is time taken to move from one track to another is called seek time

Avg seek time between two random tracks = 25 ms & worst case = 50 ms

Disk rotates at 7200 rpm = 7200/60 = 120 rps
=> 1 rotation = 1/120 sec

Disk rotates 120 times in 1 sec, so data it traverse = 120 times the track size
= 120 * 256 * 512 = 15,728,640 bytes

=> transfer rate = 15,728,640 Bps

File size = 1 MB, which contains 2048 equal sized records
Size of one record = 1 MB / 2048 = 512 bytes

1.
Size of a block = number of sectors * sector size = 8 * 512 = 4096 bytes
Record size = 512 bytes
Number of records fit in a block = block size / record size = 4096/512 = 8 records
Number of blocks required to store 1MB = 1MB/4096 = 256 blocks

2.
  
Hierarchically we can write :
cylinder -> platters -> surfaces -> tracks -> sectors ->size of data

Cylinder Capacity = 1 cylinder -> 5 platters -> 2 surfaces -> 1000 tracks -> 256 sectors -> 512 bytes =
1 * 5 * 2 * 1000 * 256 * 512 = 1,310,720,000 bytes = 1,310,720 Kbytes

3.
To read 2 blocks, i.e 2 * 4096 = 8192 bytes
To read 8192 bytes

Disk access time = seek time + rotation time + rotational latency + data transfer time

= 50 ms + 1/120 sec + 1/120 sec + 8192/15,728,640 sec
= 50 ms + 0.0083 sec + 0.0083 sec + 0.00052 sec
= 50 ms + 8.3 ms + 8.3 ms + 0.52 ms = 67.12 ms

4.
If file stored sequentially, it covers = file size/track size = ceil[1000 000 bytes / (256 times 512) bytes ] = 8 tracks

Seek time of adjacent tracks = 1 ms
=> we need 8 tracks sequentially = 8 * 1 = 8 ms
  
File access time = seek time + rotation time + rotational latency + data transfer time
= 8 * 1 ms + 8.3 ms + 8.3 ms + 1000 000 / 15, 728, 640
= 8 ms + 8.3 ms + 8.3 ms + 63.5 ms = 88.1 ms

5.
If the blocks spread randomly

File access time = avg seek time + rotation time + avg rotational latency + data transfer time

= 25 ms + 8.3 ms + (1/2) times 8.3 + 1000 000 / 15, 728,640
= 100.95 ms


Related Solutions

Consider a hard disk drive that has 5 double-sided platters, each surface has 1000 tracks, each...
Consider a hard disk drive that has 5 double-sided platters, each surface has 1000 tracks, each track has 256 sectors of size 512 bytes. Each block (disk page) comprises of 8 sectors. The seek time between adjacent tracks in 1ms and the average seek time between two random tracks is 25ms. The disk rotates at a speed of 7200 rpm (revolutions per minute). Let’s say, we have a file of size 1 MB and it contains 2048 equal-sized records. 1....
1. A hard disk drive has 16 platters, 8192 cylinders, and 256 4KB sectors per track....
1. A hard disk drive has 16 platters, 8192 cylinders, and 256 4KB sectors per track. The storage capacity of this disk drive is at most Select one: a. 32 GB. b. 128 GB. c. 32 TB. 2. To further optimize I/O performance, some SSD schedulers Select one: a. merge adjacent write requests but not adjacent read requests. b. do not merge requests at all. c. merge adjacent read requests but not adjacent write requests. 3. What steps are necessary...
1. (50 pts) Write a C program that generates a 2D array-of-double and finds the indexes...
1. (50 pts) Write a C program that generates a 2D array-of-double and finds the indexes of the largest value stored in the 2D array. Specific requirements: (1) Your main function defines the 2D array a. You will need to prompt the user to specify the size of the 2D array b. You will need to prompt the user to put in numbers to initialize the array (2) Write a function to display the array that is visualized as rows...
15 pts (3 pts for each answer 1 through 5) Nissan Motors has been producing a...
15 pts (3 pts for each answer 1 through 5) Nissan Motors has been producing a particular ignition box for its car engines. The Fabrication Department of the company has a monthly demand of 500 ignition boxes (Part #37822) with a weekly standard deviation of 80. The leadtime for this part is two weeks. For the purposes of this problem, you may assume that each month is exactly 4 weeks long. Nissan requires a 97% service level for this item....
Problem 1 (50 pts). This problem will involve the nycflights13 dataset (including tables airlines, airports, planes...
Problem 1 (50 pts). This problem will involve the nycflights13 dataset (including tables airlines, airports, planes and weather), which we saw in class. It is available in both R and Python, however R is recommended for at least the visualization portion of the question. Start by installing and importing the dataset to your chosen platform. We will first use joins to search and manipulate the dataset, then we will produce a flightpath visualization. Question e) Produce a map that colors...
Problem 5 (6 pts). A and B play a series of games. Each game is independently...
Problem 5 (6 pts). A and B play a series of games. Each game is independently won by A with probability p and by B with probability 1 − p. They stop when the total number of wins of one of the players is two greater than that of the other player. The player with the grater number of total wins is declared the winner of the series. Find the probability that a total of 4 games are played.
Question 1 5 pts Each member of Congress is elected by the people of his or...
Question 1 5 pts Each member of Congress is elected by the people of his or her own state. Which of the following is the primary duty of these elected officials? Administer the law Interpret the law Write, debate, and pass bills Oversee the enforcement of laws Question 2 5 pts A system was established by the U.S. Constitution, which keeps any one branch of government from assuming too much power over the other branches. Which of the following is...
Consider a deck of cards. Answer each question. Leave your probability as fraction. (5 pts) When...
Consider a deck of cards. Answer each question. Leave your probability as fraction. (5 pts) When one card is selected, what is the probability that the card is a numbered card (2,3,4,5,6,7,8,9,10)? (5 pts) When one card is selected, what is the probability that the card is a numbered and heart. (10 pts) When two cards are selected, what is the probability that they are both numbered cards? (10 pts) When one card is selected, what is the probability that...
Assembly Language Programming Exercise. Problem # 1: 1. Integer Expression Calculation( 5 pts ) Using the...
Assembly Language Programming Exercise. Problem # 1: 1. Integer Expression Calculation( 5 pts ) Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression, using registers: A = (A + B) − (C + D). Assign integer values to the EAX, EBX, ECX, and EDX registers.
Problem Solving Set #1 (10 pts each) a. Find the multiplicative inverse of 1234 in GF(4321)...
Problem Solving Set #1 (10 pts each) a. Find the multiplicative inverse of 1234 in GF(4321) using the extended Euclidean algorithm b. Does the multiplicative inverse of 24140 in GF(40902) exist? Prove your answer. c. Is x4 + 1 irreducible over GF(2)? Prove your answer. d. Find (x3 + x + 1)-1 in GF(24 ) mod x4 + x + 1 using the extended Euclidean algorithm e. Find (x3 + x + 1)-1 in GF(28 ) mod x8 + x4...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT