ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [Linux] File System Implementation
    programing/OS 2018. 6. 23. 21:10


    안녕하세요, Einere입니다.


    이번 포스팅은 과제로 수행했던 File System Implementation입니다.

    가상의 Disk를 생성 후, Block단위로 읽고 쓰고 지우는 등의 동작이 가능합니다.




    기본적은 file system 구성입니다.








    아래는 실제로 구현한 기능들입니다.

    FileSysInit - file system initialize


    SetInodeBitMap - set specific index's value to 1 at inode bitmap

    ResetInodeBitMap - set specific index's value to 0 at inode bitmap

    GetInode - get specific inode at inode list

    PutInode - set specific inode at inode list

    GetFreeInodeNum - get first free inode index at inode list


    SetBlockBitMap - set specific index's value to 1 at block bitmap

    ResetBlockBitMap - set specific index's value to 0 at block bitmap

    GetFreeBlockNum - get first free block index at block region


    Mount - open virtual disk (after format)

    Unmount - close virtual disk


    MakeDir - make directory

    RemoveDir - remove directory

    EnumerateDirStatus - get specific directory status


    OpenFile - open file

    CloseFile - close file

    ReadFile - read file

    WriteFile - write file

    RemoveFile - remove file



    아래 링크를 누르시면 코드를 보실 수 있습니다.

    GitHub주소



    Build 및 test 방법

    1. source를 clone합니다.

    2. terminal에서 clone한 directory로 이동합니다.

    3. $make

    4. $./test format 1

    5. $./test readwrite 2

    6. $./test readwrite 3

    7. $./test readwrite 4

    (※ 정해진 순서대로 명령을 실행하셔야 정상적으로 작동합니다.)


    'programing > OS' 카테고리의 다른 글

    [OS] 공룡책 강의노트  (0) 2018.10.16
    [Linux] process  (0) 2018.07.10
    [Linux] Disk Allocation Method  (0) 2018.06.16
    [Linux] Disk Scheduling  (0) 2018.06.16
    [Linux] Process & fork  (0) 2017.09.21

    댓글

Designed by black7375.