0% found this document useful (0 votes)
119 views25 pages

Advanced Operating System: Etefa Belachew

The document discusses key concepts related to file systems including file structure, file system mounting, and file sharing and protection. It covers file attributes, operations, types, directory structures and how mounting connects different file systems together. File sharing requires protection mechanisms to control access for multi-user systems both locally and over networks.

Uploaded by

Etefa Belachew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views25 pages

Advanced Operating System: Etefa Belachew

The document discusses key concepts related to file systems including file structure, file system mounting, and file sharing and protection. It covers file attributes, operations, types, directory structures and how mounting connects different file systems together. File sharing requires protection mechanisms to control access for multi-user systems both locally and over networks.

Uploaded by

Etefa Belachew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Advanced operating system

Etefa Belachew
Jimma University
institute of Technology
faculity of Electrical and Computer Engineering

December 17, 2022

Etefa Belachew Advanced operating system


CHAPTER THREE
File System Interface, Implementation and
Distributed File Systems

ˆ hear are parts which i am going to discuss about:


1 File and Directory Structure
2 File System Mounting
3 File Sharing and Protection

Etefa Belachew Advanced operating system


File Concept
A file is a named collection of related information that is recorded
on secondary storage.
ˆ The information in a file is defined by its creator.
ˆ Since main memory is usually too small, the computer system must
provide secondary storage to back up main Memory
ˆ The File system provides the mechanism for storage of and (multiple)
access to both data and programs residing on the disks.
ˆ Data files may be numeric, alphabetic, alphanumeric, or binary
ˆ Files may be free form, such as text files, or maybe formatted rigidly.
ˆ where files are stored? memory
ˆ The File system provides the mechanism for storage of and (multiple)
access to both data and programs residing on the disks

Etefa Belachew Advanced operating system


File concept cont....

Basesd on above informatin how can file be defined? A file


is an object on a computer that storese
1 data,
2 information,
3 settings, or commands used with a computer program.

Etefa Belachew Advanced operating system


File Management System:
Bridges the gap between low-level disk organization (an array of
blocks) and the user’s views (a stream or collection of records)
(mapped).
ˆ Some devices transfer a character or a block of characters at a
time.
ˆ Some can be accessed only sequentially, others randomly
ˆ Some transfer data synchronously, others asynchronously
ˆ Some are dedicated, some shared.
ˆ They can be read-only or read-write

Etefa Belachew Advanced operating system


File Attributes
File attributes are pieces of information associated with every file
and directory that includes additional data about the file itself or its
contents.
ˆ Name:only information kept in human-readable form
ˆ Identifier:unique tag (number) identifies file within file system
ˆ Type:needed for systems that support different types
ˆ Location:pointer to file location on device
ˆ Size :current file size(in bytes, words, or blocks)
ˆ Protection:controls who can do reading, writing, executing.
ˆ Time, date,:This information may be kept for creation, last
modification, and last use.
Information about files are kept in the directory structure,
Etefa Belachew Advanced operating system
File Operations:
File is an abstract data type. To define a file properly, we need to
consider the operations that can be performed on files.
1 Create: while creating cheack space then new file is placed .
2 Write:To write a file, we make a system call specifying both
the name and the information to be written to the file.
3 Read:: just reading from spesfic dirctory
4 Re-position:chanching position to some where neded.
5 Delete:: realseing the file out of the directory.
6 Truncate::erasing the content of file keeping its attiributes
7 Open(Fi): – search the directory structure on disk for entry
Fi, and move the content of entry to memory
8 Close (Fi): – move the content of entry Fi in memory to
Etefa Belachew Advanced operating system
File Type

ˆ A common technique for implementing file types is to include


the type as part of the file name.
ˆ The name is split into two parts-a name and an extension,
usually separated by a period character
ˆ In this way, the user and the operating system can tell from
the name alone what the type of a file is.
ˆ File name examples include resullze.doc, Server.java, and aaa.c

Etefa Belachew Advanced operating system


File Type

Etefa Belachew Advanced operating system


File Directory
ˆ To keep track of files, file systems normally have directories or
folders
ˆ Usually, a directory is itself a file
ˆ The directory can be viewed as a symbol table that translates
file names into their directory entries
ˆ A typical directory entry contains information (attributes,
location, ownership) about a file

Etefa Belachew Advanced operating system


File Directory(cont.....)
When considering a particular directory structure, we need to keep
in mind the operations that are to be performed on a directory.
ˆ Search for a file.
ˆ Delete a file
ˆ List a directory.
ˆ Rename a file
ˆ Traverse the file system
Organize the Directory (Logically) to Obtain:
ˆ Efficiency
ˆ Naming
ˆ Grouping
Etefa Belachew Advanced operating system
Types file directory:

Single level Directory


ˆ The simplest directory structure is the single-level directory
ˆ A single-level directory has significant limitations, when Direct
(Random) Access the number of files increases or when the
system has more than one user.

Etefa Belachew Advanced operating system


Types file directory cont ...:
two level Directory
ˆ In the two-level directory structure, each user has his own user
file directory (UFD)
ˆ The UFDs have similar structures, but each lists only the files
of a single user.
ˆ Can have the same file name for different user.

Etefa Belachew Advanced operating system


Types file directory cont...:
Tree-Structured Directories
ˆ The tree has a root directory, and every file in the system has
a unique path name

Etefa Belachew Advanced operating system


Types file directory cont...:
acyclic-Structured Directories
ˆ This is a generalization of Tree-structured directory
ˆ An acyclic graph (a graph with no cycles) allows directories to
share subdirectories and files

Etefa Belachew Advanced operating system


File System Mounting

what mounting stands for?


ˆ Mounting refers to the grouping of files in a file system
structure accessible to the user of the group of users.
ˆ It can be either
ˆ local: in such case mounting, it connects disk drivers as one machine,
or
ˆ remote mounting: remote mounting it uses Network File System
(NFS) to connect to directories on other machines so that they can
be used as if they are the part of the user’s file system.

Etefa Belachew Advanced operating system


File system mounting cont ...

ˆ The directory structure built out of multiple volume must be


mounted to make them available with in file system.
ˆ Mounting file system attaches that the file to directory(mount
point) and makes it available to system.The root(/) file
system is always mounted.
ˆ Lets consider the following diagrams for further illustration.

Etefa Belachew Advanced operating system


File System Mounting cont...
Suppose let a be unmounted and b be going to be mounted.

Etefa Belachew Advanced operating system


File System Mounting cont...
Hear is the procedure to mount the file.

Etefa Belachew Advanced operating system


File System Mounting cont...
After mounting we get the figure below .

Etefa Belachew Advanced operating system


File Sharing
ˆ When an OS accommodates multiple users, the issues of file
sharing, file naming, and file protection become important.
ˆ Most systems have evolved to use the concepts of file (or
directory) owner (or user) and group
ˆ The owner is the user who can change attributes and grant
ˆ The group attribute defines a subset of users who can share File
access to the file.
ˆ 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
which is so called(NFS)
Etefa Belachew Advanced operating system
File Sharing cont.....

File Sharing – Multiple Users


ˆ User IDs identify users, allowing permissions and protections
to be per-user.
ˆ Group IDs allow users to be in groups, permitting group
access rights.

Etefa Belachew Advanced operating system


file Protection

ˆ When information is stored in a computer system, we want to


keep it safe from physical damage (reliability) and improper
access (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

Etefa Belachew Advanced operating system


Types of Access

ˆ The need to protect files is a direct result of the ability to an


access files.
ˆ Systems that do not permit access to the files of other users do not
need protection
ˆ Alternatively, we could provide free access with no protection.
ˆ Both approaches are too extreme for general use. What is
needed is controlled access.
ˆ Several types of operation can be controlled
ˆ like(Read,Write,Execute,Append,Delete,List).

Etefa Belachew Advanced operating system


THIS BRINGS THE END ON MY PART
THANKS FOR YOUR ATENSION

Etefa Belachew Advanced operating system

You might also like