Looks like no one added any tags here yet for you.
The File Manager
(also called the file management system) is the software responsible for creating, deleting, modifying, and controlling access to files—as well as for managing the resources used by the files.
The File Manager is responsible for:
Creating
Deleting
Modifying
Controlling Access to Files
The File Manager provides support for:
For libraries of programs and data to online users
For spooling operations
For interactive computing
Field
A group of related bytes that can be identified by the user with a name, type, and size. A record is made up of fields.
Record
A group of related fields treated as a unit. A file is a group of related records.
File
A group of related records that contains information to be used by specific application programs to generate reports.
Database
A group of related files that are interconnected at various levels to give users
flexibility of access to the data stored.
Program Files
A file that contains instructions for the computer.
Directories
A storage area in a secondary storage volume (disk, disk pack, etc.) containing information about files stored in that volume.
Steps from the READ instructions:
Move the read/write heads to the cylinder or track where the record is to be found
Wait for the rotational delay until the sector containing the desired record passes under the read/write head
Activate the appropriate read/write head and read the record
Transfer the record to main memory
Set a Flag to indicate that the device is free to satisfy another request
Typical Volume Configurations:
Volume
Multifile Volumes
Each volume in the system is given a name
Volume
Any secondary storage unit, such as hard disks, disk packs, CDs, DVDs,
removable disks, flash memory, or tapes.
Multifile Volumes
Each storage unit, whether it’s removable or not, is considered a volume, and each volume can contain several files, so they’re called “_________.”
Master File Directory (MFD)
A file stored immediately after the volume descriptor. It lists the names and characteristics of every file contained in that volume.
Subdirectory
A directory created by the user within the boundaries of an existing directory. Some operating systems call this a folder
File Descriptor Information:
Filename
File Type
File size
File Location
Date and Time of Creation
Owner
Protection Information
Record Size
Filename
Within a single directory, filenames must be unique; in some operating
systems, the filenames are case sensitive
File Type
The organization and usage that are dependent on the system (for example, files and directories)
File Size
Although it could be computed from other information, the size is kept
here for convenience
File Location
Identification of the first physical block (or all blocks) where the file
is stored.
Protection Information
Access restrictions, based on who is allowed to access the file and what type of access is allowed
Record Size
Its fixed size or its maximum size, depending on the type of record
File-Naming Conventions 2 Components to many Fiilenames:
Relative filename
Extension
Complete Filename
Relative Filename
A file’s name and extension that differentiates it from other files in
the same directory.
Extension
In some operating systems, it’s the part of the filename that indicates which compiler or software package is needed to run the files. In UNIX and Linux, it is
optional and called a suffix.
File Organization
When we discuss file organization, we are talking about the arrangement of records within a file because all files are composed of records.
Record Format
All files are composed of records. When a user gives a command to modify the contents of a file, it’s actually a command to access records within the file.
Same format:
Fixed length, or
Variable length
Regardless of format, it can be:
Blocked
Not blocked
Fixed-length Records
A record that always contains the same number of characters.
Critical Aspect: is the size of the record
If it is too small, smaller than the number of characters to be stored in the record, the leftover characters are truncated
If it is too large, larger than the number of characters to be stored, storage space is wasted
Physical File Organization
The physical organization of a file has to do with the way records are arranged and the characteristics of the medium used to store it.
Ways on how files are organized on Magnetic Disks (Hard Drives):
Sequential
Direct
Indexed Sequential
Characteristics to consider in selecting the best of the file organizations:
Volatility of the data
Activity of the file
Size of the file
Response time
Volatility of the data
The frequency with which additions and deletions are made
Activity of the file
The percentage of records processed during a given run
Response time
The amount of time the user is willing to wait before the requested
operation is completed (This is especially crucial when doing time-sensitive searches)
Sequential Record Organization
The organization of records in a specific sequence. Records in a sequential file must be processed one after another.
Direct Record Organization
Files stored in a direct access storage device and organized to give users the flexibility of accessing any record at random, regardless of its position in the file.
Relative Address
In a direct organization environment, it indicates the position of a
record relative to the beginning of the file.
Logical Address
The result of a key-to-address transformation.
Indexed Sequential Record Organization
A way of organizing data in a direct access storage device. An index is created to show where the data records are stored. Any data record can be retrieved by consulting the index first.
Physical Storage Allocation
The File Manager must work with files not just as whole units but also as logical units or records. Records within a file must have the same format, but they can vary in length.
Types of Physical Storage Allocation:
Contiguous Storage
Noncontiguoous Storage
Indexed Storage
Contiguous Storage
A type of file storage in which all the information is stored in adjacent locations in a storage medium
Advantage:
Disadvantage:
Noncontiguous Storage
A type of file storage in which the information is stored in nonadjacent locations in a storage medium.
Extents
Any remaining records and all other additions to the file that are stored in
other sections of the disk.
Efficient Methods of Storage Allocation:
Contiguous for direct files
Noncontiguous for sequential
Access Methods
Are dictated by a file’s organization; the most flexibility is allowed
with indexed sequential files and the least with sequential.
Current Byte Address (CBA)
The address of the last byte read. It is used by the File Manager to access records in secondary storage and must be updated every time a record is accessed.
Sequential Access
For sequential access of fixed-length records, the CBA is updated simply by incrementing it by the record length (RL), which is a constant:
CBA = CBA + RL
Direct Access
If a file is organized in direct fashion, it can be accessed easily in either direct or sequential order if the records are of fixed length. In the case of direct access with fixed-length records, the CBA can be computed directly from the record length and the desired record number RN (information provided through the READ command) minus 1:
CBA = (RN - 1) * RL
(11-1) * 25 = 250
To Access a Record:
Do a sequential search
It becomes a half-sequential read through the file
Indexed Sequential File
Can be accessed either sequentially or directly, so either of the procedures to compute the CBA presented in this section would apply but with one extra step: the index file must be searched for the pointer to the block where the data is stored.
Levels in File Management System
File Manager
Basic File System
Access Control Module
Logical File System
Device Manager
Physical File System
Device Interface Module
Device
Transform Record Number to Byte Address:
CBA = (RN - 1) * RL
Access Control Matrix
is intuitively appealing and easy to implement, but because of its size it only works well for systems with a few files and a few users. In the matrix, each column identifies a user and each row identifies a file.
Access Control List
is a modification of the access control matrix. Each file is entered in the list and contains the names of the users who are allowed to access it and the type of access each is permitted.
SYSTEM or ADMIN
is designated for system personnel who have unlimited access to all files in the system.
OWNER
has absolute control over all files created in the owner’s account.
GROUP
file so that all users belonging to the appropriate group have access to it.
WORLD
is composed of all other users in the system; that is, those who don’t fall into
any of the other three categories. In this system, the File Manager designates default types of access to all files at creation time, and it’s the owner’s responsibility to change them as needed.
Capability List
Shows the access control information from a different perspective. It
lists every user and the files to which each has access
Data Compression
A procedure used to reduce the amount of space required to store data by reducing, encoding, or abbreviating repetitive terms or characters.
Data Compression Algorithms:
Lossless algorithms - typically used for text or arithmetic files
Lossy algorithm - typically used for image and sound files and remove data permanently
Text Compression
To compress text in a database, three methods are described briefly here: records with repeated characters, repeated terms, and front-end compression.
3 Methods to Compress Text in Database:
Records with repeated characters
Repeated terms
Front-end compression
Lossy Compression
Allows a loss of data from the original file to allow significant compression. This means the compression process is irreversible as the original file cannot be reconstructed.
For Video and Music Files:
International Organization for Standardization (ISO) issued MPEG standards
ISO is the world’s leading developer f international standards