Experimental File System
The eXpFS logical file system comprises of files organised in a single directory called the root. The root is also conceptually as a file. Associated with each eXpFS file there are three attributes - name, size and type, each attribute being one word long.
There are three types of eXpFS files - the root, data files and executable files. Each file in eXpFS has an entry in the root called its root entry.
Root File
The root file has the name root and contains meta-data about the files stored in file system.
| File name | File size | File type | User name | Permission |
|---|---|---|---|---|
| root | 512 | ROOT | kernel | 0 |
| file.dat | 700 | DATA | username | 0/1 |
| program.xexe | 1025 | EXEC | kernel | unused |
The operations on the root file are Open, Close, Read, Seek.
The owner of the root file is set to kernel (userid = 0) and permission set to exclusive (0) during file system formatting (see also specification of multi-user extension to eXpOS.)
Data files
A data file is a sequence of words. The maximum number of words permissible in a file is defined by the constant MAX_FILE_SIZE.
If Create system call is called, by default, the value of the file type will be DATA.
eXpOS allows an application program to perform the following operations (by invoking appropriate system calls) on data files: Create, Delete, Open, Close, Read, Write, Seek.
If a data file is externally loaded into the file system (see XFS Interface), the owner field is set to root (value = 1) and the access permission is set to open access (value = 1).
0 -> Private (Only the owner can access it. No other user can read orw rite the file).
1 -> Public (Any user can access the file. Read/write is allowed for everyone).
Executable Files
These contain executable code for programs that can be loaded and run by the operating system. From the point of view of the eXpFS file system alone, executable files are just like data files except that file type is EXEC in the root entry. By default, the owner of all executable files is set to 0.
ABI
An OS implementation on a particular machine specifies an Application Binary Interface.
- Machine model ABI
What is the difference between ABI and API?
API - High-level Abstraction, defines the functions, classes, data structures that developers use. open(), read(), write() API is generallly platform-independent.
ABI - Interface between user programs and kernel (Low-Level Detail) How the system calls are made (using specific trap/interrupt numbers), how function parameters are passed, how data structures are laid out in memory etc. An ABI is strictly architecture and OS-dependent.****