INTRODUCTION
TO
OPERATING SYSTEMS
Lecture 13: THE FILING SYSTEM (1)
CHRIS STAFF
Dept. of Computer Science and Artificial Intelligence
University of Malta
Lecture Outline
Aims and Objectives
The Filing System
Issues
File Directories
Secondary Storage and File Organisation
Logical File Organisation
Aims and Objectives
- To discuss functions performed by the Filing System
The Filing System
- File - Logical representation of data, program, report, etc.
- Filing System has 3 main functions:
- Facilities for file manipulation and long-term storage of files
- to provide secondary storage managment (covered in earlier lectures)
- to provide support for system integrity
Issues
- Users should be able to manipulate files using a symbolic name (Virtual
Machine)
- Files should be protected against accidental or malicious misuse
- Files should be protected against hardware errors and malfunctions
- System should be responsible for managing space allocation and deallocation
Manipulating Files
- What sort of things might a user want to do to files?
- What sort of things might a user want to do to the contents of files?
File Directories
Hierarchical Organisation
- Useful organisation because system facilities can be placed in one directory
and write protected, while all users on the system can each have a directory
(Home Directory, Account, etc.)
- Users need to be able to create / remove directories, rename them, copy /
move files between them, see a directory listing, etc.
Referencing Files
- Absolute Pathname, e.g., edit /usr/chris/file1
- Relative Pathname, e.g., if current working directory is /usr/chris, then can
refer to file1 as in edit file1.
- Filenames need to be unique only in a single directory.
- Identical Directory Names can be used as long as their absolute pathnames
differ.
Keeping track of files.
- File System uses File Directories
- Root directory has a Master File Directory (MFD) which is available to the
File System at system start-up.
- MFD points to User File Directories and Files.
- Each UFD points to the UFDs of any subdirectories or contains pointers to
physical start addresses of files.
- UFD also contains additional information about each entry - type (text, dir,
executable, etc) and access information (RO, RW, EO, RX, RWX, etc)
Secondary Storage and File Organisation
- Organisation of Secondary Storage can be different from the logical
organisation of files which it stores.
- SS is typically organised into fixed-sized blocks which are a multiple of 512
Bytes.
- Each block can contain one or more whole logical records. Records
cannot extend over blocks.
Logical File Organisation
- Sequential - records are retrieved in their physical order on SS. New records
are appended to the file.
- Direct - Records are accessed randomly using their phyical address. Physical
ordering of records is not important (to the user!)
- Indexed Sequential - records are ordered logically according to some logical
record key. They can be retrieved sequentially, or directly through the key
(via an index table).
Next Lecture ...
The Filing System (2)