0% found this document useful (0 votes)
10 views3 pages

Disk I/O and RAID Calculation Problems

The document presents a series of problems related to disk I/O requests, RAID configurations, and data recovery. It includes calculations for seek distances using various algorithms, parity block calculations, and data recovery from a broken disk. Additionally, it discusses performance metrics and storage capacity in RAID setups and the conversion of disk sizes based on binary measurements.

Uploaded by

huy106021
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Disk I/O and RAID Calculation Problems

The document presents a series of problems related to disk I/O requests, RAID configurations, and data recovery. It includes calculations for seek distances using various algorithms, parity block calculations, and data recovery from a broken disk. Additionally, it discusses performance metrics and storage capacity in RAID setups and the conversion of disk sizes based on binary measurements.

Uploaded by

huy106021
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Chapter 8 problems

PROBLEM 1

FACTS
Given the following assumptions:

+ The disk cylinders: from 0 to 320

+ The disk I/O request lists:

* 87, 312, 147, 64, 212, 15, 89, 5, 128, 192, 50

* 14, 82, 198, 237, 7, 319, 192, 71, 281, 194, 47

* 89, 303, 78, 298, 132, 14, 93, 147, 249, 152

+ Current head position: at cylinder 47

+ Current moving direction: from big cylinder to small cylinder

+ Serving direction: from big cylinder to small cylinder

QUESTIONS
Calculate the total number of seek distances of FIFO, SSFT, SCAN, C-SCAN, LOOK, C-LOOK of the above
request lists

PROBLEM 2
Given the following disks with corresponding data blocks. Calculate the parity block

A B C D
1001 0011 1100 0010 0001 0010 ?
0010 0111 0110 1100 ? 0100 0001
1001 1100 ? 0111 0111 0110 0011
? 0111 0100 0111 1111 0100 0000

Recover the data of the broken disk

A B C (broken) D
1001 0010 1100 0010 0111 0011
0010 0110 0110 1100 0100 0001
1001 1101 1100 0010 0110 0011
1000 0110 0111 0100 0100 0000
PROBLEM 3
Given a RAID combination with the same structure in the following Figure

+ How many times the speed is increased?

+ How many disks can be broken without losing the data?

+ Suppose each disk has the size of 1TB, calculate the size of the above file system?

PROBLEM 4
Given a RAID combination with the similar structure in the following Figure with 4 group of RAID6.

+ How many times the speed is increased?

+ How many disks can be broken without losing the data?

+ Suppose each disk has the size of 1TB, calculate the size of the above file system?

2
PROBLEM 5
Suppose you buy the following disk: 500GB, 960GB, 6TB, 2TB, 1TB, calculate the size of the disk in the
base of 210 , i.e., 1KB=210 B, 1MB=210 KB, 1GB=210MB

Common questions

Powered by AI

RAID 1+0, or RAID 10, combines mirroring and striping to provide high performance and fault tolerance, as read and write operations can occur simultaneously across multiple disks. The striping enhances performance by distributing data across several disks, which speeds up data access and throughput, while mirroring duplicates this across pairs for reliability. RAID 10 offers excellent performance and can withstand multiple disk failures as long as they don't occur in both members of a mirrored pair, unlike RAID 5 or RAID 6 which rely on parity for rebuilding data but may have slower write performance due to additional parity calculations .

The SCAN algorithm, also known as the elevator algorithm, moves the disk arm towards the end of the disk, servicing requests until it reaches the last cylinder, then reverses direction and services requests on the return path. In contrast, the LOOK algorithm also moves back and forth, but only goes as far as the last request in each direction before reversing, which can reduce unnecessary movement and thus the total seek time. This means LOOK can have lower seek times compared to SCAN by avoiding travel across unused cylinders, leading to improved efficiency .

When calculating the total seek distances using the FIFO algorithm, one must consider the sequence in which the requests are made (i.e., the order given in the list), as the seek time is directly dependent on this order. The current head position and the direction of movement are also critical, as they determine the starting point and path of the seek operation. Based on the given head position of 47, each subsequent request's seek distance is the absolute difference from the current head position or previous request serviced. The total seek distance is the sum of all individual seek distances from start to finish .

Disk sizes reported using the binary system (base 2, where 1KB = 2^10B, 1MB = 2^10KB, etc.) typically represent less capacity than when calculated using the decimal system (base 10, where 1KB = 1000B, etc.), due to differences in byte counts. For example, a 500GB disk would contain 500 * 2^30 bytes in the binary system, resulting in a perceived less capacity compared to its 'decimal' equivalent which would count 500 * 10^9 bytes. This results in consumers perceiving they have less storage than advertised when binaries are equated to decimals since more bytes in the binary are required to meet the same 'Giga' prefix in decimal .

To calculate parity for reconstructing a broken disk in a RAID, use bitwise XOR operations across the surviving disks. Given disks A, B, and D, calculate the parity (C) as follows: XOR each corresponding bit across the disks. For example, for the binary numbers 1001, 0011, 1100, and 0010, the operation would be: (1001 XOR 0011 XOR 1100 XOR 0010), which results in the parity block 0100. This can be applied across corresponding blocks to reconstruct all data for the broken disk C .

In RAID 0, throughput is increased by striping data across multiple disks, allowing simultaneous read and write operations on different stripes, which aggregates the bandwidth of all disks in the array. The theoretical increase in throughput is proportional to the number of disks, for example, doubling with two disks, assuming no other bottlenecks such as connections or controllers. However, RAID 0 offers no redundancy, meaning any single disk failure leads to complete data loss across the array, marking a significant risk to data safety .

RAID 6 enhances data reliability by using dual parity blocks, allowing the system to tolerate up to two simultaneous disk failures without data loss. However, there is a trade-off in terms of storage efficiency, as more space is dedicated to storing parity information rather than actual data, reducing the net usable storage capacity. Specifically, a larger proportion of total storage is required for redundancy. For example, in a 4-group RAID 6 system, even after tolerating two disk failures, the remaining operational disks must collectively provide enough parity to regenerate any missing data .

When selecting a RAID level for a data center, factors to consider include performance needs (speed of read/write operations), reliability requirements (tolerance to disk failures), storage efficiency (usable capacity), latency in data recovery, and cost (number of disks required). For high performance, RAID 0 or RAID 10 might be suitable due to their superior throughput and low read/write latency. For reliability, RAID 6 or RAID 10 offer better fault tolerance. The intended workload (read-heavy vs. write-heavy) also influences choice, as write-intensive environments may suffer performance penalties in parity-based RAIDs (e.g., RAID 5, RAID 6). Balancing these factors against budgetary constraints is key .

To compute total capacity with binary-based sizes (using 2^10 conversions), each disk's size is first converted from its decimal interpreted size (e.g., 1TB = 1,000,000,000,000 bytes) to the binary equivalent (e.g., 1TB = 2^40 bytes). Sum these binary representations for an accurate total capacity. Compared to a decimal-based approach (adding sizes directly), the binary method typically yields a lower total capacity, illustrating the linguistic discrepancy between binary-authorized sizing and decimal spec sheets. For comparison, apply the binary equivalence to each disk, summing them and converting back to the more familiar decimal notation as needed .

C-SCAN, or Circular SCAN, differs from SCAN by continually processing requests in one direction only, then jumping back to the starting point at the opposite end of the disk without servicing requests on the return trip. This can lead to a more uniform wait time and reduced variance in wait time since requests are treated in cyclic order. While SCAN minimizes seek time by servicing in both directions, C-SCAN's approach reduces the wait times for requests arriving after the head has passed them, thus providing a fairer average wait time, though potentially increasing total seek distance as it always returns to zero .

You might also like