Home / Expert Answers / Computer Science / we-have-two-mass-storage-devices-a-and-b-with-the-same-specs-each-can-store-n-bits-but-read-write-pa550

(Solved): We have two mass storage devices, A and B with the same specs. Each can store N bits, but read/write ...



We have two mass storage devices, A and B with the same specs. Each can store N bits, but read/write operations are slow. We mitigate this problem by turning the two devices into a storage array: data is alternatingly written to A and B. The array can now store 2N bits, and read and write at almost twice the speed of the individual devices, assuming that the time it takes to send data to A and B is negligible, compared to the time it takes each device to write the data. There is however a flaw in this plan. Since data is distributed over two devices, the total chance of failure has now doubled. The failure of just one device causes the failure of the array. We could eliminate this problem by copying all of As data redundantly to an additional devices C, and all of Bs data to an additional device D. This insures against single and double drive failure, but at the cost of doubling the required amount of storage devices. We decide that simultaneous drive failure is sufficiently unlikely to ignore that possibility, and we will guard against data loss from single drive failure only. This requires only one extra device C, as follows: We abstract each device as a list of bits, A = a1, a2, ..., aN , B = b1, b2, ..., bN and C = c1, c2, ..., cN . At the time the data is written to drive A and B, a checksum is also written to drive C, according to: ck = ak XOR bk for each k = 1, 2, ..., N . Here, XOR is the bitwise exclusive or operation. For example, all this means that if the original file is 01100110, then A stores 0101 and B stores 1010, and C stores 1111. Make sure you understand this example. If not, you are not understanding this question, and cannot answer it correctly. (a) (2 points) Assume that after the data has been written to drives A, B and C as explained above, drive A is destroyed. Only drives B and C are left. Explain how each bit ak can be reconstructed from the knowledge of bk and ck. Your explanation must be specific and detailed. It is insufficient to declare that A can be reconstructed from B and C or such. Hint: consider the four cases for (bk, ck) : (1, 0), (1, 1), (0, 0) and (0, 1). Explain in each case how ak can be reconstructed. (b) (2 points) Would the same reconstruction property still hold if the data on drive C had been written according to: ck = ak AND bk for each k = 1, ..., N ? You must fully explain your answer. (c) (2 points) Would the same reconstruction property still hold if the data on drive C had been written according to: ck = ak OR bk for each k = 1, ..., N ? You must fully explain your answer.



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe