Question

In: Other

For each of the three disk block allocation strategies (contiguous, linked, and indexed), if we are...

For each of the three disk block allocation strategies (contiguous, linked, and indexed), if we are currently at logical block 12 (the last block accessed was block 12) and want to access logical block 5, how many physical blocks must be read from the disk? Assume that the information about each file is already in memory. Block Size = 512

Solutions

Expert Solution

Answer:---------

For Contiguous Allocation Stragegies ===> Physical Blocks Read: 1
Contiguous Allocation Stragegies requires that each file occupy a set of contiguous blocks on the disk. Disk addresses define a linear ordering on the disk.

It can move from 12 to 5 with 1 read.

Note:---
For any type of access, contiguous allocation requires only one access to get a disk block. Since we can easily keep the initial address of the file in memory, we can calculate immediately the  disk address of the ith block (or the next block) and read it directly.

For Linked Allocation Stragegies ===>  Physical Blocks Read: 7
For direct access, however, an access to the ith block might require i disk reads. This problem indicates why linked allocation should not be used for an application requiring direct access."

The last block was logical block 12, to move back to block 5 (assuming the same file, and doubly linked list), it would take at most 7 reads. Logical read of pointer to previous block from 12, same for 11,10,9,8,7,6 , and finally it would be at block 5.

For Indexed Allocation Stragegies ===> Physical Blocks Read: 1
If the index block is already in memory, then the access can be made directly.
Given the information that it is in memory, then only 1 block read is needed since the index table is loaded into memory.


Related Solutions

Provide an example of how healthcare can be linked to each of the three pillars of...
Provide an example of how healthcare can be linked to each of the three pillars of sustainability (economy, society, and environment). Please explain (150+ words).
18. Structure and function are intricately linked concepts in A&P. Describe three ways in which we...
18. Structure and function are intricately linked concepts in A&P. Describe three ways in which we have seen the relationship between structure and function in A&P thus far 19. Define an activated carrier and name at least two activated carriers used in human cells 20. Compare and contrast somatic and sex cells (eggs/sperm)
Discuss the three types of market development strategies and give examples of each.
Discuss the three types of market development strategies and give examples of each.
Briefly describe the three generic business - level strategies , providing an example of each
Briefly describe the three generic business - level strategies , providing an example of each
Alice and Bob are playing a game in which each of them has three strategies, A,...
Alice and Bob are playing a game in which each of them has three strategies, A, B, or C. If their choices do not match (e.g., if Alice picks B and Bob picks C), then no money is exchanged; otherwise Alice pays Bob $6 (if they both choose A), or $3 (if they both choose B), or $1 (if they both choose C). Is this a zero-sum game? Find a mixed-strategy Nash equilibrium for it. Is this the only equilibrium...
what are the three categories of prevention strategies for workplace violence, and provide example of each....
what are the three categories of prevention strategies for workplace violence, and provide example of each. (must be at least 150 words)
For each of the four orienting strategies we have discussed in class, identify and briefly describe...
For each of the four orienting strategies we have discussed in class, identify and briefly describe one kind of problem, issue, or phenomenon that the strategy would suggest is worth theorizing about. Exchange Conflict Functionalism Interactionism
Describe the three methods used to allocate joint costs. What are the advantages/disadvantages of each allocation...
Describe the three methods used to allocate joint costs. What are the advantages/disadvantages of each allocation method? Which method would you recommend? Why? Support your position with evidence from the text or external sources.​
Three linked traits in garden pea plants are each controlled by two alleles. Yellow pods are...
Three linked traits in garden pea plants are each controlled by two alleles. Yellow pods are recessive to green pods, bluish green seedlings are recessive to green seedlings, and creeper is recessive to normal. A plant heterozygous for all three traits was crossed to a creeper plant with yellow pods and bluish green seedlings. The following F2 results were obtained: 171 green pods, bluish green seedlings, creeper 307 yellow pods, green seedlings, creeper 13 green pods, green seedlings, normal 2067...
list and briefly discuss the three main strategies that companies use to finance operations. For each...
list and briefly discuss the three main strategies that companies use to finance operations. For each of the strategies, indicate the risk level to the company.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT