Question

In: Computer Science

1.Storing all blocks of a large file on consecutive disk blocks would minimize seeks during sequential...

1.Storing all blocks of a large file on consecutive disk blocks would minimize

seeks during sequential file reads. Why is it impractical to do so? What do operating

systems do instead, to minimize the number of seeks during sequential

reads?

2. Some databases use magnetic disks in a way that only sectors in outer tracks are

used, while sectors in inner tracks are left unused. What might be the benefits

of doing so?

3. A database administrator can choose how many disks are organized into a

single RAID 5 array. What are the trade-offs between having fewer disks versus

more disks, in terms of cost, reliability, performance during failure, and

performance during rebuild?

4. SSDs can be used as a storage layer between memory and magnetic disks, with

some parts of the database (e.g., some relations) stored on SSDs and the rest

on magnetic disks. Alternatively, SSDs can be used as a buffer or cache for

magnetic disks; frequently used blocks would reside on the SSD layer, while

infrequently used blocks would reside on magnetic disk.

a. Which of the two alternatives would you choose if you need to support

real-time queries that must be answered within a guaranteed short period

of time? Explain why.

b. Which of the two alternatives would you choose if you had a very large

customer relation, where only some disk blocks of the relation are accessed

frequently, with other blocks rarely accessed.

Solutions

Expert Solution

1. Operating systems optimize their disks usage by reducing the volume of the data transferred while making requests consecutive. The advantages of storing all blocks of a large file on consecutive disk blocks are:

a) Efficient utilization of disk space.
b) file blocks can be accessed very fastly.

Buffer caches ensures that disk reads happen only when it is necessary, write buffering will minimize writes, disk scheduling minimize seek distances.

According to this process each file occupies a consecutive set of blocks on the disk. For example, if a file requires n blocks in total d the starting location of given block, then the blocks assigned to the file will be: d, d+1, d+2,…… d+n-1.

2.  Some databases uses magnetic disks in a way that only sectors in outer tracks are used while sectors in inner tracks are left unused because :

i) Inner tracks have very less sectors compared to outer tracks to keep slack space on the disk

ii) The transfer rate (the number of sectors read per second) is higher on outer tracks.

3.  RAID -means Redundant Array of Independent Disks. It stores the same data in different places on multiple hard disks.There are different levels in it. RAID 5 is one of those levels.

A database administrator can choose at least three disks organized into a single RAID 5 array. but due to performance reasons often it is recommended to use at least five disks. The parity information is striped across the each drive, which enables the array to function even if one drive fails also.

Sometimes It can take more time to rebuild a RAID 5 array, when a disk fails.

Due to its array's architecture that allows read and write operations to span multiple drives which results in better performance than a single drive, but not as high as that of a RAID 0 array.

4. a) As there are moving parts in magnetic disks, random seeks will cost the time. So, I feel it’s better not to choose magnetic disks.

b) As time is an important factor for having a very large customer relation, I won't prefer to choose magnetic disks as it's taking much time for seeking data information.


Related Solutions

Blocks on a computer disk are good with probability p and faulty with probability 1− p....
Blocks on a computer disk are good with probability p and faulty with probability 1− p. Blocks are good or bad independently of each other. Let Y denote the location (starting from 1) of the first bad block. a : Find the pmf of Y. b: Find the expected value of Y.  
1)Consider a file system in which a file can be deleted and its disk space reclaimed...
1)Consider a file system in which a file can be deleted and its disk space reclaimed while links to that file still exist. What problems may occur if a new file is created in the same storage area or with the same absolute path name? How can these problems be avoided? 2)Consider a file systemthat uses a modified contiguous-allocation scheme with support for extents.A file is a collection of extents, with each extent corresponding to a contiguous set of blocks....
Question 2. (1 point) Biovision BVH is a very popular file format for storing human body...
Question 2. (1 point) Biovision BVH is a very popular file format for storing human body motion data. Learn this file format by yourself from online resources, then 1) describe it in a short paragraph. 2) How can you use its data to compare the similarity between two body poses?
An invoice file would best be coded using a(n) coding scheme. a alphabetic b. mnemonic c. block d. sequential
An invoice file would best be coded using a(n) coding scheme. a alphabeticb. mnemonicc. blockd. sequential
1. Department 2 is the second of three sequential processes. All materials are added at the...
1. Department 2 is the second of three sequential processes. All materials are added at the beginning of processing in Department 2. During October, Department 2 reported the following data: Number of units Conversion costs percentage complete Units started 60,000 - Completed and transferred 50,000 - Work in process, October 1 26,000 60% Work in process, October 31 36,000 20% Costs for October Transferred In Materials Conversion Costs Work in process, October 1 $45,000 $25,000 $54,000 Added during the month...
What lessons can we all learn from a disaster? What would be your plan to minimize...
What lessons can we all learn from a disaster? What would be your plan to minimize loss of life and property if the disaster occurred locally?Please describe short-term and long-term effects of a natural disasters on the economy.
1. a) which ideas would MINIMIZE THE HARM to the American people? (the idea being that...
1. a) which ideas would MINIMIZE THE HARM to the American people? (the idea being that we do not want to hurt the millions of people who are barely making ends meet right now) b) which ideas are “big” ideas---in the sense that they would contribute “more” to deficit reduction, compared to other, competing ideas? Please include these “guiding principles” in your discussion, AND FEEL FREE TO INCLUDE OTHER PRINCIPLES AS WELL!
Deviations from informational efficiency would result in a large cost that will be borne by all...
Deviations from informational efficiency would result in a large cost that will be borne by all participants, namely inefficient resource allocation. Corporations with overpriced securities, for example, would be able to obtain capital too expensively while undervalued companies might forgo investment opportunities because the cost of raising capital would be too low. True False
C ++ Data File Preparation 1. Using the original AL Weather Station Data file find all...
C ++ Data File Preparation 1. Using the original AL Weather Station Data file find all records that have a bad data flag (-9999) for either the PRCP, TMAX or TMIN fields. Produce a new data file (call it Filtered_AL_Weather_Station.txt ) that omits those records with bad data flags. This new file will be used in problem 2. NOTE: The temperatures are given in tenths of a degree Celsius. e.g 83 is 8.3 degrees C.    2. Using the filtered data...
Compare the difference in the assessment of the internal control of a: 1.Large company during an...
Compare the difference in the assessment of the internal control of a: 1.Large company during an audit. 2. Medium company during an audit. 3. Small company during an audit.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT