1 of 17

Filesystem Implemenatation

CSC 213 - Operating Systems

Leah Perlmutter | Fall 2023

2 of 17

Announcements

3 of 17

Agenda for Today

  1. Announcements
  2. Q&A
  3. Filesystem Implementation
  4. Break
  5. Filesystem Implementation
  6. Wrap-up

4 of 17

Announcements

  • Lab: Peer-to-peer chat due Tuesday 11/21 (tomorrow) at 11:59 pm
  • Reading: OSTEP ch 42, due Wednesday at the start of class
  • Assignment: none!
  • Project: proposal feedback coming soon
    • if we've talked, don't wait to start
    • late proposals accepted for credit

​

  • CS Table: Smartphone Addiction
    • Tuesday, November 21st at noon in JRC 224A
  • COVID and Flu Shots
    • You can still get extra credit for both of these!

​

​

​

5 of 17

Q&A

6 of 17

P2P Chat Lab Q&A

​

​

​

​

​

​

​

7 of 17

Project Q&A

Can I use code from earlier in this class? yes! Includes labs, assignments, exercises, demos. Make sure to cite it.

​

​

​

​

​

​

8 of 17

Filesystems

9 of 17

Whiteboard:�Elements of a Filesystem

10 of 17

11 of 17

A Simple File System

disk

256 blocks, each 4KB�1 byte disk addresses��inodes

56 bytes of metadata�8 direct block pointers��layout

1 superblock�1 block for inode bitmap�1 block for data block bitmap�4 blocks for inode entries

What is the total size of this disk?�

How many inode entries or data blocks can be tracked with a single bitmap block?�

What is the size of an inode entry?�

How many inodes does this file system support?�

How many data blocks does this file system have?�

What is the largest supported file size?�

12 of 17

13 of 17

14 of 17

A (Slightly) Better Simple File System

disk

256 blocks, each 4KB�1 byte disk addresses��inodes

56 bytes of metadata�7 direct block pointers�1 indirect block pointer��layout

1 superblock�1 block for inode bitmap�1 block for data block bitmap�4 blocks for inode entries

Consider the same filesystem we looked at earlier, but now each inode entry contains an additional pointer to an indirect block.

What is the effect of adding this indirect block pointer?

​

​

What is the new max file size with this filesystem?�

15 of 17

here is the actual calculation

but if we weren't limited by disc size and pointer size...

(from earlier)

16 of 17

Wrap up

17 of 17

Announcements

  • Lab: Peer-to-peer chat due Tuesday 11/21 (tomorrow) at 11:59 pm
  • Reading: OSTEP ch 42, due Wednesday at the start of class
  • Assignment: none!
  • Project: proposal feedback coming soon
    • if we've talked, don't wait to start
    • late proposals accepted for credit

​

  • CS Table: Smartphone Addiction
    • Tuesday, November 21st at noon in JRC 224A
  • COVID and Flu Shots
    • You can still get extra credit for both of these!

​

​

​