OS Chapter 6
OS Chapter 6
OS Chapter 6
Chapter Outline
●
Introduction
●
Functions of file management
●
File Attributes
●
Operations on a file
●
File Access Methods
●
Directory Structure
●
File Protection
1.Name
●
Every file carries a name by which the file is
recognized in the file system.
●
It is the only information which is in human-
readable form.
●
One directory cannot have two files with the
same name.
Windows Unix
Process Control CreateProcess() fork()
ExitProcess() exit()
WaitForSingleObject() wait()
●
When information is kept in a computer system, we
want to keep it safe from physical damage (reliability)
and improper access (protection).
●
Reliability is generally provided by duplicate copies of
files.
●
Many computers have systems programs that
automatically (or through computer-operator
intervention) copy disk files to tape at regular
intervals (once per day or week or month) to
maintain a copy should a file system be accidentally
destroyed.
Chapter 6 File management 33
File Protection
●
File systems can be damaged by hardware problems
(such as errors in reading or writing), power surges or
failures, head crashes, dirt, temperature extremes, and
vandalism.
●
Files may be deleted accidentally. Bugs in the file-system
software can also cause file contents to be lost.
●
Protection can be provided in many ways.
●
For a small single-user system, we might provide
protection by physically removing the floppy disks and
locking them in a desk drawer or file cabinet.
●
In a multi-user system, however, other mechanisms are
needed.
Chapter 6 File management 34
File Protection(Types of Access)
●
Complete protection is provided by prohibiting access.
●
Free access is provided with no protection.
●
Both approaches are too extreme for general use.
●
What is needed is controlled access.
●
Protection mechanisms provide controlled access by
limiting the types of file access that can be made.
●
Access is permitted or denied depending on several
factors, one of which is the type of access requested.
Several different types of operations may be controlled: