Development and Implementation of a File System for Gannet Virtual ...
Development and Implementation of a File System for Gannet Virtual ...
Development and Implementation of a File System for Gannet Virtual ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.2.2.5 Stat Data Structure<br />
<strong>Gannet</strong>FS file system uses stat data structure to maintain characteristic <strong>of</strong> file. It<br />
means, stat stores all in<strong>for</strong>mation about a file. Stat data structure uses stripped<br />
down version <strong>of</strong> POSIX’s stat structure to save more space.<br />
The first field is flag which is set on how the file was opened. There are two types <strong>of</strong><br />
flag that is supported, namely read only <strong>and</strong> write only. <strong>File</strong> cannot open <strong>for</strong> both<br />
read <strong>and</strong> write purpose. Next field is file’s mode which represent file’s type <strong>and</strong><br />
permission.<br />
Inode field represents a pointer to an inode that associated to a file. Then, <strong>of</strong>fset field<br />
records the <strong>of</strong>fset within the file being reading or reading. The default is zero <strong>and</strong><br />
will be increased by each subsequent read or write operation.<br />
3.2.3 <strong>File</strong> <strong>System</strong> Programming Interface Design<br />
Having discussion regarding the file system data structure, the following section<br />
describes how the file system interacts with users or modules. This mechanism also<br />
called as an interface. It provides communication mechanisms between modules or<br />
systems. Through this interface, the collaboration between modules <strong>and</strong> objects<br />
takes place. The requirement stated that the file system must be plat<strong>for</strong>m<br />
independent. Thus, a good design interface <strong>of</strong> file system is crucial <strong>for</strong> this project.<br />
However, there is a POSIX which describes the contract between the application <strong>and</strong><br />
its library on the operating system. It is an international st<strong>and</strong>ard with set <strong>of</strong><br />
definitions <strong>and</strong> assertions which can be used to verify compliance. A con<strong>for</strong>ming<br />
POSIX application gains the confidence level that a system is a plat<strong>for</strong>m independent<br />
35