Consider a file currently consisting of 83 blocks. Assume that the file control block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous allocation case, assume that there is room to grow in the beginning and in the end. Assume that the block information to be added is stored in memory. For linked allocation, there is a head and tail pointer pointing respectively to the first and last node. Note that while calculating the total number of I/O operations for each, also indicate how many are from r (read) and w (write). For each part, if there is more than one answer, choose the one that gives you the least number of I/O operations. The block is removed from the beginning The block is added after 41st block The block is removed from the end Assumptions: Read one whole block = one I/O operation Write one whole block = one I/O operation The directory information for each allocation is already in the RAM. If the directory information is updated, it does not need to be written back to the disk For linked allocation, a file allocation table (FAT) is not used, i.e., only the address of the starting and ending block is in memory All preparation of a block (including putting in the data and any link value) is done in main memory and then the block is written to disk with one write operation The file control block does not have to be written to disk after a change (this is typical where many operations are performed on a file) At most one index block is required per file and it does not have to be written to disk after a change For linked, contiguous and indexed allocations, assume that no I/O operations are necessary to add a freed block to the free list The OS has information about the free blocks. It does not have to go to the disk to find a free block When a block is removed, nothing needs to be written to that disk block indicating it is removed

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Consider a file currently consisting of 83 blocks. Assume that the file control block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous allocation case, assume that there is room to grow in the beginning and in the end. Assume that the block information to be added is stored in memory. For linked allocation, there is a head and tail pointer pointing respectively to the first and last node.

Note that while calculating the total number of I/O operations for each, also indicate how many are from r (read) and w (write). For each part, if there is more than one answer, choose the one that gives you the least number of I/O operations.

  1. The block is removed from the beginning
  2. The block is added after 41st block
  3. The block is removed from the end

Assumptions:

  • Read one whole block = one I/O operation
  • Write one whole block = one I/O operation
  • The directory information for each allocation is already in the RAM. If the directory information is updated, it does not need to be written back to the disk
  • For linked allocation, a file allocation table (FAT) is not used, i.e., only the address of the starting and ending block is in memory
  • All preparation of a block (including putting in the data and any link value) is done in main memory and then the block is written to disk with one write operation
  • The file control block does not have to be written to disk after a change (this is typical where many operations are performed on a file)
  • At most one index block is required per file and it does not have to be written to disk after a change
  • For linked, contiguous and indexed allocations, assume that no I/O operations are necessary to add a freed block to the free list
  • The OS has information about the free blocks. It does not have to go to the disk to find a free block
  • When a block is removed, nothing needs to be written to that disk block indicating it is removed
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Memory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education