Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 10 - File System, 10.3 Directory and Disk Structure, create index…
Chapter 10 - File System
10.2 Access Method
Sequential Access
read_next()
reads next portion of file & automatically advances file pointer
write_next()
append to end of file & advance to new end file
reset
back to beginning of file
Direct Access
reset -> cp = 0;
read next -> read cp; cp = cp + 1;
write next -> write cp; cp = cp + 1;
IBM Indexed Sequential-Access Methid (ISAM)
small master index
file sorted on defined key
done by OS
index store in memory
index too large, store on disk
10.1 File Concept
File Types
Text
Source Code
Executable
Object
Batch
Word Processor
Library
Print or View
Archive
Multimedia
File Attributes
Name
Identifier
Type
Location
Size
Protection
Time, Date, User Identification
File Operation
Create
Write
Read
Reposition Within File
Delete
Truncate
Open & Close (Fi)
Field
: Group of related bytes
Record
: Group of related fields
File
: Group of related records
Database
: Group of related files
Program File
: Contain instructions
Directories
: Listings of filenames and their attributes
10.6 Protection
Access Control Verification Module
File Sharing
Advantage:
Save space
Synchronized data updates & system's resource efficiency
Disadvantage:
Need protection -> Access Control
Access Control
Access Control Matrix (ACM)
abstract state to access control
shows access rights to each user for each file (RWED-) in matrix form
Advantages:
Easy implement
Works well in system with few files & users
Disadvatages:
files & users increse, size increases => possibly beyond memory capacity
wasted space
Access Control List (ACL)
associate with each file & directory specify user and access types
Advantage:
requires less storage
Shorten List
SYSTEM => personnel unlimited access to all files
OWNER => absolute control all files created in own acc
GROUP => all users belong to appropriate group have access
WORLD => all other users in system
RWED-
R -> read access
W -> write access
E -> execute access
D -> delete access
'-' -> access not allowed
10.3 Directory and Disk Structure
Volume
: entity containing a file system and information about each files in the system
Configuration:
Secondary storage unit
Multi-file volume
Multi-volume files
Operation performed of directory
Search for a file
Create a file
Delete a file
List a directory
Rename a file
Traverse the file system
Structure
Single-Level DIrectory
Disadvantages:
Long search time for individual file
Cannot create subdirectories
Cannot safeguard file
Each program needs unique name
Advantages:
Very easy implementation
Searching files is easy if all files have small size
Two-Level Directory
Advantages:
Each file has path name
Allows similar file name for different user
Allows efficient searching
Disadvantages:
Cannot share file with another user
Not scalable
Incapable of grouping file logically
Tree-Structured Directory
Advantages:
Very scalable
Less chances of collision
Absolute path and relative path makes searching easy
Disadvantages:
Files cannot be shared
Inefficient because a file may go under multiple directories
Acyclic-Graph
Advantages:
Allows sharing of file
Searching file is easy
Disadvantages:
Problems may arise when deleting files shared through linking
General Graph
Advantages:
More flexible than others
Allows cycles
Disadvantages:
Requires garbage collection
More costly than others
create index for file
cp = pointer to next block to be read/writen