IT308 - Operating Systems Project

Hierarchical File System using Inodes.

Ankit Muchhala: 201301099, Sahil Jain: 201301111

This project implements as a basic file system in PYTHON and provides basic file systems calls. It provides file system memory management in a virtual storage space. It supports file calls and other directory calls like - cd, ls, etc. The UNIX data structure called ‘inode’ has been used to for file management. Each inode represents a file system object and stores the attributes and disk locations of that file system object’s data. The file system object can be a file or a directory.In our implementation, we have one root directory which contains files and directories.

The disk structure contains segments for a superblock, inode address spaces and corresponding data along with the root directory. Currently the inode addresses have an upper limit of 4096 bytes divided into 4 chunks of size 1024 bytes. Hence effectively, since the size of the inode address is 64 bytes, each block will have 16 such inode addresses. The total number of inodes blocks are therefore 16 * 4 = 64 .Each inode block consists of a set of attributes specifying the size of data that it is referencing, the last modified timestamp, the CR timestamp and the address field that contains the data.

How to run?

$ cd 
$ python main.py
 > open test.txt
 > write test.txt HELLO
 > read test.txt
OUT: HELLO

To run the test

$ python test.py

Note

Currently the project only supports one word input. It will create two more files disk and journal.