hw4-key - EECS 678 Introduction to Operating Systems...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EECS 678 Introduction to Operating Systems Homework 4 (Total of 50 Points) Answer Key Question 1 (Chap 10 & 11; 20 Points) Consider the organization of a UNIX file as represented by the inode. Assume there are 8 direct block pointers, and a singly, doubly, and triply indirect pointer in each inode. Further, assume that the system block size and the disk sector size are both 4K. If the disk block pointer is 32 bits, with 8 bits to identify the physical disk, and 24 bits to identify the physical block, then: 1. What is the maximum file size supported by this system? Since 32 bits is 4 bytes, a block of pointers can hold 4K / 4 = 1K pointers. Therefore, the number of blocks that can be pointed to is: 8 from the direct block pointers; 1K from the singly indirect pointer; 1K * 1K from the double indirect pointer; and 1K * 1K * 1K from the triply indirect pointer. So the total number of blocks is 8 + 1K + 1M + 1G blocks. Since a block is 4K bytes, the total is 4,402,345,705,472 bytes, or a little over 4 terabytes. 2. What is the maximum file system partition supported by this system? The maximum file system partition is the amount of disk space that can be addressed by the disk block addressing scheme. In this case, each physical disk has 24 bits to identify the physical block, so the maximum is 2 ^ 24 blocks = 64 GB. Across all 256 possible physical disks (because 2 ^ 8 = 256), this means that there is a possible 2 ^ 32 blocks = 16 terabytes of addressable disk space. Note that this example was realistic for many years, but has been passed by technology development, since we can buy a disk greater than 64GB for $100. This implies that current file systems must use more than 24 bits for the disk block number, and/or use a larger disk block size. 3. Assuming no information other than the file inode is already in system memory, how many disk
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

hw4-key - EECS 678 Introduction to Operating Systems...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online