Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Chapter 3 part 2


Published on

  • Be the first to comment

Chapter 3 part 2

  1. 1. Chapter 3: File Management Part 2
  2. 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
  3. 3. Free space managementNeed to reuse the space from deleted files for new filesTechnique:1) Using free lists2)Using bitmaps
  4. 4. 1) Using free listsSome systems use a free list to manage the storage device’s free space Free list: Linked list of blocks containing the locations of free blocks Blocks 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 blocks Increases file access time
  5. 5. Free space management using a free list
  6. 6. 2) Using bitmapsA bitmap contains one bit for each block in memory ith bit corresponds to the ith block on the storage deviceAdvantage 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
  7. 7. Free space management using a bitmap
  8. 8. Techniques for implementingfile access controlFiles are often used to store sensitive data such as: Credit card numbers Passwords Social security numbersTherefore, they should include mechanisms to control user access to data. 1) Access control matrix 2) Access control by user classes
  9. 9. 1) Access control by matrixTwo-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
  10. 10. Access control matrix
  11. 11. 2)Access control by user classesA technique that requires considerably less space is to control access to various user classesUser classes can include: The file owner A specified user Group Project PublicAccess control data Can be stored as part of the file control block Often consumes an insignificant amount of space
  12. 12. Techniques used to preventdata lossBackup techniques Store redundant copies of informationPhysical safeguards such as locks and fire alarms are the lowest level of data protectionPerforming periodic backups is the most common technique used to ensure the continued availability of dataTechniques:1) Physical backup2)Logical backup
  13. 13. 1) Physical backups Duplicate a storage device’s data at the bit level2) Logical backups Store 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