+ All Categories
Home > Documents > File Systems Long-term Information Storage Store large amounts of information Information must...

File Systems Long-term Information Storage Store large amounts of information Information must...

Date post: 12-Jan-2016
Category:
Upload: justin-hubbard
View: 212 times
Download: 0 times
Share this document with a friend
22
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple processes must be able to access the information concurrently. Files are the units on external media that provide us with a solution to these three issues.
Transcript
Page 1: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Systems Long-term Information Storage

Store large amounts of information Information must survive the termination of

the process using it Multiple processes must be able to access

the information concurrently. Files are the units on external media

that provide us with a solution to these three issues.

Page 2: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File System Part of the OS that manages these

aspects of files Structuring Naming Accessing Using Protecting Implemented

Page 3: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Files (User’s POV)

Files are given a name upon creation Naming convention differs by OS

DOS has a 8 character limitation for the name Windows XP supports 255 character file names Character set that is allowed for naming of files

also differs by OS Some OS have case sensitive file names

file, FILE, File, FiLe, filE are all different in UNIX but the same in MS-DOS

Page 4: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Files (User’s POV) cont. File Extensions

In addition to the name most OSs have a second part of the file name called the extension

Extension usually indicates the type of file

However, the extension may can be renamed and the program that uses that file could care less about the extension… it will still load/execute the file correctly

Page 5: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Common File Extensions and Meanings

Page 6: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Structure

Unstructured Sequence of Bytes – Most Flexible Meaning must be imposed by the user UNIX and Windows uses this

Record Sequence – fixed length records each with some internal structure (antiquated system)

Page 7: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Structure (cont.)

Tree of Records – Each record contains a key field in a particular position. The tree is sorted on the key field for rapid searching. Used in mainframes and commercial

data processing

Page 8: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Types

Regular Files – contain user information

Directories – system files that maintain structure of the file system

Character Special – Used to model serial I/O devices

Block Special – model disks

Page 9: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Regular Files

Usually either ASCII or Binary ASCII – contains text (stuff we can

read) Binary – have an internal structure

known to the program that reads them (we cannot open these up and easily read them)

Page 10: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Binary (Executable and Archive)

Page 11: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Access

Sequential – bytes read from beginning to end with no ability to skip.

Random – Bytes can be read out of order read operation – give position in a file to

start reading at. seek operation – sets the current

position

Page 12: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Attributes

Page 13: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Operations Create – file created and some

attributes set Delete – removes file Open – a process must open a file

before it is used. Fetches attributes Close – frees up space Read – Usually from current position

and caller must provide buffer

Page 14: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

File Operations (cont.) Write – Usually written at the current

position Append – add data to the end of file Seek – specifies where to retrieve

data. Repositions file pointer (often used before a read or write)

Get Attributes/Set Attributes Rename

Page 15: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Directories

Used to keep track (organize) files in a logical manner.

Files themselves

Page 16: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Single-Level Directories

One directory containing all files for all users.

What are the problems?

A single level directory systemcontains 4 filesowned by 3 different people, A, B, and C

Page 17: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Two-Level Directory

What if we provided a directory for each user to store their files.

What does this solve? What is still desired?

Page 18: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Hierarchical Directory

Allows users to group their files in a logical manner (tree of directories)

Page 19: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Path Names

Absolute – specifies from the root directory the full path to the file

Relative – specifies file location from the current directory location

Working directory is another name for current directory

Page 20: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Path Names (cont.)

. (dot) – notion for current directory

.. (dot dot) – notion for parent directory of the current directory

These notions can be used when specifying a relative path

Page 21: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Paths (cont.)

Page 22: File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.

Directory Operations (UNIX) Create – empty directory created Delete Opendir – opens a directory so that it can be

read Closedir Readdir – returns next entry in an open

directory Rename Link – Allows files to appear in more than one

directory Unlink – directory entry is removed


Recommended