Consider a file system on a disk that has both logical and physical block sizes of 512 bytes. Assume that the information about each file is already in memory. For each of the three allocation strategies (contiguous, linked, and indexed), answer these questions:

1. How is the logical-to-physical address mapping accomplished in this system? (For the indexed allocation, assume that a file is always less than 512 blocks long.)

2. If we are currently at logical block 10 (the last block accessed was block 10 ) and want to access logical block 4, how many physical blocks must be read from the disk?

Solution Preview

Let X is the starting address of the file

a. Contiguous:- Now, since files are stored in contiguous memory block , the file system only stores the starting address of the file

i. To reach to X, We first need to divide it by 512.
Y=X/512 -> Y+X will give us the starting of the block.
Z=X%512 -> Z will be the displacement in that block.

ii. Since, files are stored in contiguous block we will need to make just 1 read to go to block 4 from block 10.(We know that it is 6 blocks away from this block , so we can directly ...

Solution Summary

For each of the three allocation strategies (contiguous, linked, and indexed), the solution answers various questions.

Summation of indexed data
The following is a list of 14 measurements:
-70, -95, -14, -4, 22, -42, -56, 82, 99, 32, -57, 34, -39, -6
Suppose that these 14 measurements are respectively labeled X1, X2, .........., X14
(Thus -70 is labeled X1, -95 is labeled X2 and so on)
Find Summation (Xi/9)
Round your answer

Explain one advantage that
a. a sequential file has over an indexed file
b. a sequential file has over a hash file
c. an indexed file has over a sequential file
d. an indexed file has over a hash file
e. a hash file has over a sequential file
f. a hash file has over an indexed file

All doctor offices have not become 100% computerized yet. You can still see good % of offices use manual patient record files indexed by the first letter of patients' last names. Is this manual search close to searching in a sorted array or in a sorted linked list? Write your thoughts.

Summation of indexed data
The following is a list of 14 measurements:
51, -15, -19, 56, 63, 54, 0, 85, 18, -37, 33, 58, -94, -45
Suppose that these 14 measurements are respectively labeled . (Thus, is labeled , is labeled , and so on.)
Find .

Assume the US economy experienced deflation during the year and that the consumer price index decreased by 1% in the first six months of the year and by 2% during the second six months of the year.
If an investor had purchased inflation-indexed Treasury bonds with a par value of $10,000 and a coupon rate of 5%, how much would

Summation of indexed data
The following is a list of 10 measurements:
-91, -52, 98, 61, -40 12, 61, -88, -100, 36
Suppose that these 10 measurements are respectively labeled . (Thus, is labeled , is labeled , and so on.)
Find .
Round your answer to at least two decimal places.

Describe each of the following as an indexed family of sets. Here, pi denotes the coordinated xy-plane.
a) The family of closed intervals of length 1 on the real line.
b) The family of all circles in pi of radius 1 whose center is on the y-axis.
c) The family of all circles in pi of radius 1.
d) The family of all li

Each year the I.R.S. adjusts the value of an exemption based on inflation (and rounded to the nearest $50). In a recent year if the exemption was worth $3,100 and inflation was 4.7%, what would be the amount of the exemption for the upcoming tax year?

3. An indexed file for the inventory data on disk and its index table are as follows:
Disk file
Disk Address Record Key Item Name Quantity Price
43 130 Pen 300 $4
20 12 Paper 200 $5
05 23 Disk