quiz2 - Name USC ID INF 551 Spring 2016 Quiz 2 File systems(10 points 10 minutes Recall that we have seen a small file sy

quiz2 - Name USC ID INF 551 Spring 2016 Quiz 2 File...

This preview shows page 1 out of 2 pages.

You've reached the end of your free preview.

Want to read both pages?

Unformatted text preview: Name: ___________________________ USC ID: ______________________ INF 551 – Spring 2016 Quiz 2: File systems (10 points) 10 minutes Recall that we have seen a small file system stored in a disk of 64 blocks as shown below. sh is ar stu ed d vi y re aC s o ou urc rs e eH w er as o. co m Now let us consider a new disk with 128 blocks, but the organization of file system on the disk remains the same. In other words, the new disk still has the first 8 blocks storing the superblock, two bitmaps (i-­‐ map and d-­‐map) for tracking the free slots for inodes (i-­‐map) and free data blocks (d-­‐map). But the new disk now has additional 64 data blocks, numbered 64 to 127. Suppose that the disk and file system have the following parameters. Block size Number of blocks on disk Inode size Number of inode blocks a. [2 points] How many files can the file system store on the disk? Answer: 5 blocks store inodes: 4KB/block*5=20KB Inode size=512B File system can store: 20KB/512B=40 files [2 points] What is the maximum size of a file that can be stored in this file system? Answer: Data Region: 128-­‐8=120 Maximum size: 120*4KB=480KB [2 points] How many bits are there in the two bitmaps, i-­‐map and b-­‐map? Answer: i-­‐map: 40 inodes * 1bit = 40 bits b-­‐map: 120 blocks * 1 bit = 120 bits [2 points] If the inumber of a file is 12, where is its corresponding inode located on the disk (i.e., offset)? Answer: Offset=inodeStartAddress+inumber*Inode size=12KB+12*512B=18KB Th b. c. d. 4KB 128 512B 5 (blocks #3 to #7) Name: ___________________________ USC ID: ______________________ Th sh is ar stu ed d vi y re aC s o ou urc rs e eH w er as o. co m e. [2 points] Recall that some data block may be used to store pointers. Assume each pointer needs 2 bytes. How many pointers can a data block store? Answer: 4KB/2Bytes=2048 pointers Powered by TCPDF ( ) ...
View Full Document

  • Fall '14
  • Trigraph, sh, ed d, Digraph, disk

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes