chapter 3 part 2

13
Chapter 3: File Management Part 2

Upload: rohassanie

Post on 22-May-2015

1.377 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Chapter 3 part 2

Chapter 3: File ManagementPart 2

Page 2: Chapter 3 part 2

Learning OutcomeBy the end of this lecture, student will be able

to:1)Describe free space management technique2)Describe various technique for implementing

file access control3)Describe technique used to prevent data loss

Page 3: Chapter 3 part 2

Free space management Need to reuse the space from deleted files

for new filesTechnique:1)Using free lists2)Using bitmaps

Page 4: Chapter 3 part 2

1) Using free listsSome systems use a free list to manage the storage

device’s free spaceFree list: Linked list of blocks containing the locations

of free blocksBlocks are allocated from the beginning of the free

list Newly freed blocks are appended to the end of the list

Low overhead to perform free list maintenance operations

Files are likely to be allocated in noncontiguous blocksIncreases file access time

Page 5: Chapter 3 part 2

Free space management using a free list

Page 6: Chapter 3 part 2

2) Using bitmapsA bitmap contains one bit for each block in

memoryith bit corresponds to the ith block on the storage

deviceAdvantage of bitmaps over free lists:

The file system can quickly determine if contiguous blocks are available at certain locations on secondary storage

Disadvantage of bitmaps:The file system may need to search the entire

bitmap to find a free block, resulting in substantial execution overhead

Page 7: Chapter 3 part 2

Free space management using a bitmap

Page 8: Chapter 3 part 2

Techniques for implementing file access controlFiles are often used to store sensitive data

such as: Credit card numbersPasswordsSocial security numbers

Therefore, they should include mechanisms to control user access to data.1)Access control matrix2)Access control by user classes

Page 9: Chapter 3 part 2

1) Access control by matrixTwo-dimensional access control matrix:

Entry aij is 1 if user i is allowed access to file j

Otherwise aij = 0

In an installation with a large number of users and a large number of files, this matrix generally would be large and sparse

Inappropriate for most systems

Page 10: Chapter 3 part 2

Access control matrix

Page 11: Chapter 3 part 2

2)Access control by user classesA technique that requires considerably less

space is to control access to various user classesUser classes can include:

The file ownerA specified userGroupProjectPublic

Access control dataCan be stored as part of the file control blockOften consumes an insignificant amount of space

Page 12: Chapter 3 part 2

Techniques used to prevent data lossBackup techniques

Store redundant copies of informationPhysical safeguards such as locks and fire

alarms are the lowest level of data protectionPerforming periodic backups is the most

common technique used to ensure the continued availability of data

Techniques:1)Physical backup2)Logical backup

Page 13: Chapter 3 part 2

1) Physical backups Duplicate a storage device’s data at the bit

level

2) Logical backupsStore file system data and its logical structure Inspect the directory structure to determine

which files need to be backed up, then write these files to a backup device in a common, often compressed, archival format