1/74
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
File Concept
Contiguous logical address space
Data
Numeric
Character
Binary
Program
Enumerate the types of File Concept
Name
only information kept in human-readable form
Identifier
unique tag (number) identifies the file within the file system
Type
needed for systems that support different types
Location
pointer to file location on the device
Size
current file size
Protection
controls who can do the reading, writing, executing
Time, date, and user identification
data for protection, security, and usage monitoring
Directory Structure
Information about files are kept in the ____
Directory Structure
A collection of nodes containing information about all files
DISK
Both the directory structure and the files reside on
Create
Write
Read
Reposition within file
Delete
Truncate
Open (Fi)
Close (Fi)
Enumerate File Operations
Open Files
Several pieces of data are needed to manage open files:
Open-file table
tracks open files
File pointer
pointer to last read/write location, per process that has the file open
File-open count
counter of number of times a file is open – to allow removal of data from open-file table when last processes closes it
Disk location of the file
cache of data access information
Access rights
per-process access mode information
Open File Locking
Provided by some operating systems and file systems
Shared lock
It is similar to reader lock
Shared lock
several processes can acquire concurrently
Mandatory
access is denied depending on locks held and requested
Advisory
processes can find status of locks and decide what to do
Executable Files - ex, co, bin`
Ready-to-run machine-language program.
Object Files - obj
Compiled, machine language, not linked
Source Code Files
ource code in various languages
Batch Files
Commands to the command interpreter
Text Files
Textual data, documents.
Word Processor Files
Various word-processor formats
Library Files
Libraries of routines for programmers
Print or View Files
ASCII or binary file in a format for printing or viewing.
Archive Files
Related files grouped into one file, sometimes compressed, for archiving or storage
Multimedia Files
Binary file containing audio or A/V information.
None
sequence of words, bytes
Lines
Fixed length
Variable length
Enumerate Simple record structure
Formatted document
Relocatable load file
Enumerate Complex Structures
Sequential Access
Direct Access
Types of Access Methods
read next
write next
Reset
no read after last write (rewrite)
Enumerate the Operations of Sequential Access
Direct Access
A file is fixed length logical records
read n
write n
position to n
read next
write next
rewrite n
Enumerate operation of Direct Access
Relative block numbers
allow OS to decide where file should be placed
Partitions
Disk can be subdivided into ___
RAID
Disks or partitions can be ____ protected against failure
raw and formatted
Disk or partition can be used _____ without a file system, or _____ with a file system
minidisks, slices
Partitions also known as
volume
Entity containing file system
device directory or volume table of contents
volume containing a file system also tracks that file system’s info
tmpfs
memory-based volatile FS for fast, temporary I/O
objfs
interface into kernel memory to get kernel symbols for debugging
ctfs
contract file system for managing daemons
lofs
loopback file system allows one FS to be accessed in place of another
procfs
kernel interface to process structures
ufs, zfs
general purpose file systems
Efficiency
Naming
Grouping
The directory is organized logically to obtain?
Acyclic-Graph Directories
have shared subdirectories and files
Link
another name (pointer) to an existing file
Resolve the link
follow pointer to locate the file
Garbage collection
How do we guarantee no cycles
True
True or False
A file system must be mounted before it can be accessed
File Sharing
Sharing of files on multi-user systems is desirable
Sharing may be done through a protection scheme
On distributed systems, files may be shared across a network
Network File System (NFS)
common distributed file-sharing method
User IDs
identify users, allowing permissions and protections to be per-user
Group IDs
allow users to be in groups, permitting group access rights
File Sharing – Remote File Systems
Uses networking to allow file system access between systems
Client-server model
allows clients to mount remote file systems from servers
NFS
standard UNIX client-server file sharing protocol
CIFS
standard Windows protocol
True
True or false:
All file systems have failure modes
metadata
corruption of directory structures or other non-user data,
state information
Recovery from failure can involve _______ about status of each remote request
Stateless protocols (NFS v3)
include all information in each request, allowing easy recovery but less security
File Sharing – Consistency Semantics
Specify how multiple users are to access a shared file simultaneously
Andrew File System (AFS)
implemented complex remote file sharing semantics
Unix file system (UFS)
Writes to an open file visible immediately to other users of the same open file and shares file pointer to allow multiple users to read and write concurrently