Implementing the File System | Assignment 3 | Operating System

Brief Information
  • Title: Implementing the File System
  • Hand-in date: 2016-05-17 Tue.
  • Due date (1st): 2016-05-29 Sun.
  • Due date (2nd): 2016-05-31 Tue.
  • Due date (3rd): 2016-06-26 Sun.
  • How to do the assignment: (pdf files)
    • Homework 3
    • Homework 3: appendix
    • 과제3 변경 및 중요사항(Homework 3: changes and important notices)
  • 2016-05-21 Sat. 23:13: Read the instructions. Try to implement a function that parses a full file path of Linux into the names of directories and the file.
  • 2016-05-22 Sun. 12:25: The parse function has been implemented in ParseAbsolutePath.h and ParseAbsolutePath.c.
  • 2016-05-22 Sun. 23:59: The function Mount in FileSystem.c is now being made.
  • 2016-05-24 Mon. 18:57: The function ExistInBitmap that returns a boolean value of whether a block exists in the bitmap.
  • 2016-05-26 Wed. 21:24:
    • The functions Mount and Unmount has been almost completed.
      • For Mount, other initializing functions have been made together.
    • The function GetEmptyBitmapIndex has been made.
      • The function returns the index of a bitmap. The index is same as the index of an empty inode or directory block.
  • 2016-05-27 Thu. 11:44:
    • The function ReverseBit has been implemented.
    • The case OPEN_FLAG_CREATE of the function OpenFile has been implemented.
  • 2016-05-28 Fri. 18:24:
    • The modified FileSysInfo.h and FileSysInfo.c and the new file Mount.c were given.
    • I reorganized the codes that initialize and mount the file system information onto the memory.
  • 2016-05-30 Sun.: Begin to use BufRead, BufWrite, and BufSync. These functions are made
  • 2016-05-30 Sun. 13:35: The functions GetInode and GetDirBlock have been made using BufRead.
  • 2016-05-31 Tue.: The 3rd deadline is declared since few students succeeded in implementing the program.
  • 2016-06-19 Sun.: I started to make the program for the 3rd submission.
  • 2016-06-25 Sat.: My implementation successfully executed all five test cases.
Steps to Conquer the Assignment
  1. Implement a function that parses a full file path of Linux into the names of directories and the file
    • Make the function by separating its files, a header file and a source file.
  2. Understand the structure of the virtual disk.
    • Summary
      • [inode] An inode represents a file or a directory.
      • [valid bit] If a page is in the physical disk but not in the logical memory, then the valid bit is set to be invalid. If the page in both the physical disk and the logical memory, then the valid bit is set to be valid.
      • [valid bit] In an easy way, if a file is closed, then the valid bit is set to be invalid, and if the file is open, then the valid bit of the file is set to be valid.
  3. Determine the order of implementing the functions.
    • Mount -> Unmount -> MakeDir -> RemoveDir -> OpenFile -> CloseFile -> RemoveFile -> ReadFile -> WriteFile -> EnumerateDirStatus
  4. The rest of thoughts were wroted by hand.
Essential C Source Code Files
  1. testcase.c: A file with the main function and test functions
  2. Disk.h: A given file
  3. Disk.c: A given file
  4. hw2.h: A given file
  5. hw2.c: A given file that was implemented in the assignment 2.
  6. FileSystem.h: A given file
  7. FileSystem.c: A file to implement
A Source Code to Test



Leave a Reply

Your email address will not be published. Required fields are marked *