SlideShare a Scribd company logo
1 of 19
Chapter 3: File Management
           Part 1
Learning outcome:
By the end of this lecture, students will be able to:
1) Identify basic function of file system
2)Describe file organization techniques
3) Describe types of file structure
4)Describe various methods of file allocation
File Management : Introduction
File management system can be define as a system that an
 operating system uses to keep track of different files.
Unlike the CPU and memory management aspects of the
 operating system which aim mainly towards an optimum
 use of the CPU, file management aims to provide a
 convenient programming environment for the users of the
 system.
There are several functions that must be performed by an
 efficient file system:
   include storing of files in an orderly fashion
   accessing the stored files
   appending the stored files and protecting the files from
       loss of data
File Structure
File organization techniques
 Concerned with how records are arranged &
  characteristics of medium used to store it.
 On magnetic disks, files can be organized as:
   1) Sequential
   2) Direct
   3) Indexed sequential
Characteristics Considered When
Selecting File Organization
Volatility of data—frequency with which additions &
  deletions made.

Activity of file—% records processed during a given
  run.

Size of file.

Response time—amount of time user is willing to
  wait before requested operation is completed.
1) Sequential
Easiest to implement because records are stored &
 retrieved serially, one after other.
To speed process some optimization features may be
 built into system.
  E.g., select a key field from record & then sort records
   by that field before storing them.
  Aids search process.
  Complicates maintenance algorithms because original
   order must be preserved every time records added or
   deleted.
2) Direct
Uses direct access files which can be implemented
 only on direct access storage devices.
Give users flexibility of accessing any record in any
 order without having to begin search from beginning
 of file.
Records are identified by their relative addresses
 (their addresses relative to beginning of file).
  Logical addresses computed when records are stored
   & again when records are retrieved.
  Use hashing algorithms
Advantages:
1) Fast access to records.
2)Can be updated more quickly than sequential files
  because records quickly rewritten to original addresses
  after modifications

Disadvantage:
1) Several records with unique keys may generate same
  logical address (collision)
3) Indexed sequential
Combines best of sequential & direct access.
Created & maintained through Indexed Sequential
 Access Method (ISAM) software package.
Doesn’t create collisions because it doesn’t use result of
 hashing algorithm to generate a record’s address.
    Uses info to generate index file through which records retrieved.
Divides ordered sequential file into blocks of equal size.
    Size determined by File Manager to take advantage of physical storage
     devices & to optimize retrieval strategies.
Each entry in index file contains highest record key &
  physical location of data block where this record, &
  records with smaller keys, are stored.
Methods of file allocation
File manager works with files
 As whole units
 As logical units or records
Within file
 Records must have same format
 Record length may vary
Records subdivided into fields
Application programs manage record structure
Three methods:
1) Contiguous file allocation
2) Linked list non-contiguous (using blocks)
3) Linked list non-contiguous (using index)
1) Contiguous file allocation
Records stored one after another
  Advantages
     Any record found once starting address, size known
     Easy direct access

  Disadvantages
       Difficult file expansion, fragmentation
2) Linked list non-contiguous
(using blocks)
Files use any available disk storage space
File records stored in contiguous manner
  If enough empty space
Remaining file records and additions
  Stored in other disk sections (extents)
  Extents
     Linked together with pointers
     Physical size determined by operating system

     Usually 256 bytes
File extents linked in two ways
 Storage level
     Each extent points to next one in sequence
     Directory entry
     Filename, storage location of first extent, location of last
      extent, total number of extents (not counting first)
  Directory level
     Each extent listed with physical address, size, pointer to next
      extent
     Null pointer indicates last one

Advantage
 Eliminates external storage fragmentation
 Eliminates need for compaction
Disadvantage
 No direct access support
       Cannot determine specific record’s exact location
3) Linked list non-contiguous
allocation (using index)
 Allows direct record access
   Brings pointers together
        Links every extent file into index block
 Every file has own index block
   Disk sector addresses for file
   Lists entry in order sectors linked
 Supports sequential and direct access
 Does not necessarily improve storage space use
 Larger files experience several index levels
Chapter 3 part 1

More Related Content

What's hot

Teknologi Cloud computing ( Teknologi awan)
Teknologi Cloud computing ( Teknologi awan)Teknologi Cloud computing ( Teknologi awan)
Teknologi Cloud computing ( Teknologi awan)Shahril Majid
 
Bagaimana cabaran globalisasi mempengaruhi he di malaysia
Bagaimana cabaran globalisasi mempengaruhi he di malaysiaBagaimana cabaran globalisasi mempengaruhi he di malaysia
Bagaimana cabaran globalisasi mempengaruhi he di malaysiaMohamed Syafiq
 
Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...
Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...
Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...FaFai S.
 
Hak hak dan kebebasan wanita di malaysia
Hak hak dan kebebasan wanita di malaysiaHak hak dan kebebasan wanita di malaysia
Hak hak dan kebebasan wanita di malaysiahafizuddinhussin
 
Cabang-cabang falsafah menurut pandangan ahli falsafah barat
Cabang-cabang falsafah menurut pandangan ahli falsafah baratCabang-cabang falsafah menurut pandangan ahli falsafah barat
Cabang-cabang falsafah menurut pandangan ahli falsafah baratFatin Ain Nabila
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 
Isu alam sekitar (Masalah dan Penyelesaian)
Isu alam sekitar (Masalah dan Penyelesaian)Isu alam sekitar (Masalah dan Penyelesaian)
Isu alam sekitar (Masalah dan Penyelesaian)Engku Fatin
 
Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...
Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...
Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...UNIVERSITY FOR TEACHERS XD
 
Penghayatan etika dan peradaban ( mpu21032 )
Penghayatan etika dan peradaban  ( mpu21032 )Penghayatan etika dan peradaban  ( mpu21032 )
Penghayatan etika dan peradaban ( mpu21032 )NurAyuni31
 
konsep negara bangsa
 konsep negara bangsa konsep negara bangsa
konsep negara bangsasafeqa
 
Kelebihan dan kelemahan pangkalan data
Kelebihan dan kelemahan pangkalan dataKelebihan dan kelemahan pangkalan data
Kelebihan dan kelemahan pangkalan datawonglaiyen
 
Cabaran cabaran dalam mengeratkan hubungan etnik
Cabaran cabaran dalam mengeratkan hubungan etnikCabaran cabaran dalam mengeratkan hubungan etnik
Cabaran cabaran dalam mengeratkan hubungan etnikCik BaCo
 
Keselamatan cyber
Keselamatan cyberKeselamatan cyber
Keselamatan cyberAzie Rahman
 
Isu-isu Etika Dalam Pengurusan Islam
Isu-isu Etika Dalam Pengurusan IslamIsu-isu Etika Dalam Pengurusan Islam
Isu-isu Etika Dalam Pengurusan IslamEnigma
 
Cabaran dalam pendidikan dan bahasa
Cabaran dalam pendidikan dan bahasaCabaran dalam pendidikan dan bahasa
Cabaran dalam pendidikan dan bahasaChanyy96
 

What's hot (20)

Teknologi Cloud computing ( Teknologi awan)
Teknologi Cloud computing ( Teknologi awan)Teknologi Cloud computing ( Teknologi awan)
Teknologi Cloud computing ( Teknologi awan)
 
Bagaimana cabaran globalisasi mempengaruhi he di malaysia
Bagaimana cabaran globalisasi mempengaruhi he di malaysiaBagaimana cabaran globalisasi mempengaruhi he di malaysia
Bagaimana cabaran globalisasi mempengaruhi he di malaysia
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Integrasi nasional
Integrasi nasionalIntegrasi nasional
Integrasi nasional
 
Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...
Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...
Ukuran kecenderungan memusat ; min, mod, median (EDUP3063 Pentaksiran dalam P...
 
Hak hak dan kebebasan wanita di malaysia
Hak hak dan kebebasan wanita di malaysiaHak hak dan kebebasan wanita di malaysia
Hak hak dan kebebasan wanita di malaysia
 
04 Agama
04 Agama04 Agama
04 Agama
 
Cabang-cabang falsafah menurut pandangan ahli falsafah barat
Cabang-cabang falsafah menurut pandangan ahli falsafah baratCabang-cabang falsafah menurut pandangan ahli falsafah barat
Cabang-cabang falsafah menurut pandangan ahli falsafah barat
 
Modul google classroom v1
Modul google classroom v1Modul google classroom v1
Modul google classroom v1
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
Isu alam sekitar (Masalah dan Penyelesaian)
Isu alam sekitar (Masalah dan Penyelesaian)Isu alam sekitar (Masalah dan Penyelesaian)
Isu alam sekitar (Masalah dan Penyelesaian)
 
Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...
Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...
Usaha dan strategi yang diambil oleh kerajaan bagi memantapkan usaha mencapai...
 
Pembinaan negara bangsa
Pembinaan negara bangsaPembinaan negara bangsa
Pembinaan negara bangsa
 
Penghayatan etika dan peradaban ( mpu21032 )
Penghayatan etika dan peradaban  ( mpu21032 )Penghayatan etika dan peradaban  ( mpu21032 )
Penghayatan etika dan peradaban ( mpu21032 )
 
konsep negara bangsa
 konsep negara bangsa konsep negara bangsa
konsep negara bangsa
 
Kelebihan dan kelemahan pangkalan data
Kelebihan dan kelemahan pangkalan dataKelebihan dan kelemahan pangkalan data
Kelebihan dan kelemahan pangkalan data
 
Cabaran cabaran dalam mengeratkan hubungan etnik
Cabaran cabaran dalam mengeratkan hubungan etnikCabaran cabaran dalam mengeratkan hubungan etnik
Cabaran cabaran dalam mengeratkan hubungan etnik
 
Keselamatan cyber
Keselamatan cyberKeselamatan cyber
Keselamatan cyber
 
Isu-isu Etika Dalam Pengurusan Islam
Isu-isu Etika Dalam Pengurusan IslamIsu-isu Etika Dalam Pengurusan Islam
Isu-isu Etika Dalam Pengurusan Islam
 
Cabaran dalam pendidikan dan bahasa
Cabaran dalam pendidikan dan bahasaCabaran dalam pendidikan dan bahasa
Cabaran dalam pendidikan dan bahasa
 

Similar to Chapter 3 part 1

File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file managementKalai Selvi
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methodssangrampatil81
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file managementKalai Selvi
 
Understanding operating systems 5th ed ch08
Understanding operating systems 5th ed ch08Understanding operating systems 5th ed ch08
Understanding operating systems 5th ed ch08BarrBoy
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learningLavanya Sharma
 
Secondary Storage Management
Secondary Storage ManagementSecondary Storage Management
Secondary Storage ManagementPriyanshuGandhi3
 
File system interfacefinal
File system interfacefinalFile system interfacefinal
File system interfacefinalmarangburu42
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMSVrushaliSolanke
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdfFraolUmeta
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OSC.U
 

Similar to Chapter 3 part 1 (20)

Files
FilesFiles
Files
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
 
File Systems
File SystemsFile Systems
File Systems
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
Directory implementation and allocation methods
Directory implementation and allocation methodsDirectory implementation and allocation methods
Directory implementation and allocation methods
 
Dude.pptx
Dude.pptxDude.pptx
Dude.pptx
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
Understanding operating systems 5th ed ch08
Understanding operating systems 5th ed ch08Understanding operating systems 5th ed ch08
Understanding operating systems 5th ed ch08
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
 
Secondary Storage Management
Secondary Storage ManagementSecondary Storage Management
Secondary Storage Management
 
File system interfacefinal
File system interfacefinalFile system interfacefinal
File system interfacefinal
 
File organization and introduction of DBMS
File organization and introduction of DBMSFile organization and introduction of DBMS
File organization and introduction of DBMS
 
fileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdffileorganizationandintroductionofdbms-210313163900.pdf
fileorganizationandintroductionofdbms-210313163900.pdf
 
File Management.ppt
File Management.pptFile Management.ppt
File Management.ppt
 
OSCh12
OSCh12OSCh12
OSCh12
 
Ch12 OS
Ch12 OSCh12 OS
Ch12 OS
 
OS_Ch12
OS_Ch12OS_Ch12
OS_Ch12
 

More from rohassanie

Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012rohassanie
 
FP 201 - Unit 6
FP 201 - Unit 6FP 201 - Unit 6
FP 201 - Unit 6rohassanie
 
FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2rohassanie
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2rohassanie
 
FP 202 - Chapter 5
FP 202 - Chapter 5FP 202 - Chapter 5
FP 202 - Chapter 5rohassanie
 
Chapter 3 part 2
Chapter 3 part 2Chapter 3 part 2
Chapter 3 part 2rohassanie
 
FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3rohassanie
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3rohassanie
 
FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2rohassanie
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2) rohassanie
 
Labsheet 7 FP 201
Labsheet 7 FP 201Labsheet 7 FP 201
Labsheet 7 FP 201rohassanie
 
Labsheet 6 - FP 201
Labsheet 6 - FP 201Labsheet 6 - FP 201
Labsheet 6 - FP 201rohassanie
 
Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012rohassanie
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1rohassanie
 
FP 201 Unit 3
FP 201 Unit 3 FP 201 Unit 3
FP 201 Unit 3 rohassanie
 

More from rohassanie (20)

Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012Course outline FP202 - Dis 2012
Course outline FP202 - Dis 2012
 
FP 201 - Unit 6
FP 201 - Unit 6FP 201 - Unit 6
FP 201 - Unit 6
 
Fp201 unit5 1
Fp201 unit5 1Fp201 unit5 1
Fp201 unit5 1
 
FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2FP 201 - Unit4 Part 2
FP 201 - Unit4 Part 2
 
Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
 
FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2FP 201 - Unit 3 Part 2
FP 201 - Unit 3 Part 2
 
FP 202 - Chapter 5
FP 202 - Chapter 5FP 202 - Chapter 5
FP 202 - Chapter 5
 
Chapter 3 part 2
Chapter 3 part 2Chapter 3 part 2
Chapter 3 part 2
 
FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3
 
FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3FP 201 Unit 2 - Part 3
FP 201 Unit 2 - Part 3
 
FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2FP 201 Unit 2 - Part 2
FP 201 Unit 2 - Part 2
 
Lab ex 1
Lab ex 1Lab ex 1
Lab ex 1
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2)
 
Labsheet 7 FP 201
Labsheet 7 FP 201Labsheet 7 FP 201
Labsheet 7 FP 201
 
Labsheet 6 - FP 201
Labsheet 6 - FP 201Labsheet 6 - FP 201
Labsheet 6 - FP 201
 
Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012Jadual Waktu Sesi JUN 2012
Jadual Waktu Sesi JUN 2012
 
Labsheet 5
Labsheet 5Labsheet 5
Labsheet 5
 
Labsheet 4
Labsheet 4Labsheet 4
Labsheet 4
 
Chapter 2 part 1
Chapter 2 part 1Chapter 2 part 1
Chapter 2 part 1
 
FP 201 Unit 3
FP 201 Unit 3 FP 201 Unit 3
FP 201 Unit 3
 

Chapter 3 part 1

  • 1. Chapter 3: File Management Part 1
  • 2. Learning outcome: By the end of this lecture, students will be able to: 1) Identify basic function of file system 2)Describe file organization techniques 3) Describe types of file structure 4)Describe various methods of file allocation
  • 3. File Management : Introduction File management system can be define as a system that an operating system uses to keep track of different files. Unlike the CPU and memory management aspects of the operating system which aim mainly towards an optimum use of the CPU, file management aims to provide a convenient programming environment for the users of the system. There are several functions that must be performed by an efficient file system:  include storing of files in an orderly fashion  accessing the stored files  appending the stored files and protecting the files from loss of data
  • 5. File organization techniques  Concerned with how records are arranged & characteristics of medium used to store it.  On magnetic disks, files can be organized as: 1) Sequential 2) Direct 3) Indexed sequential
  • 6. Characteristics Considered When Selecting File Organization Volatility of data—frequency with which additions & deletions made. Activity of file—% records processed during a given run. Size of file. Response time—amount of time user is willing to wait before requested operation is completed.
  • 7. 1) Sequential Easiest to implement because records are stored & retrieved serially, one after other. To speed process some optimization features may be built into system. E.g., select a key field from record & then sort records by that field before storing them. Aids search process. Complicates maintenance algorithms because original order must be preserved every time records added or deleted.
  • 8. 2) Direct Uses direct access files which can be implemented only on direct access storage devices. Give users flexibility of accessing any record in any order without having to begin search from beginning of file. Records are identified by their relative addresses (their addresses relative to beginning of file). Logical addresses computed when records are stored & again when records are retrieved. Use hashing algorithms
  • 9. Advantages: 1) Fast access to records. 2)Can be updated more quickly than sequential files because records quickly rewritten to original addresses after modifications Disadvantage: 1) Several records with unique keys may generate same logical address (collision)
  • 10. 3) Indexed sequential Combines best of sequential & direct access. Created & maintained through Indexed Sequential Access Method (ISAM) software package. Doesn’t create collisions because it doesn’t use result of hashing algorithm to generate a record’s address.  Uses info to generate index file through which records retrieved. Divides ordered sequential file into blocks of equal size.  Size determined by File Manager to take advantage of physical storage devices & to optimize retrieval strategies. Each entry in index file contains highest record key & physical location of data block where this record, & records with smaller keys, are stored.
  • 11. Methods of file allocation File manager works with files As whole units As logical units or records Within file Records must have same format Record length may vary Records subdivided into fields Application programs manage record structure Three methods: 1) Contiguous file allocation 2) Linked list non-contiguous (using blocks) 3) Linked list non-contiguous (using index)
  • 12.
  • 13. 1) Contiguous file allocation Records stored one after another Advantages  Any record found once starting address, size known  Easy direct access Disadvantages  Difficult file expansion, fragmentation
  • 14. 2) Linked list non-contiguous (using blocks) Files use any available disk storage space File records stored in contiguous manner If enough empty space Remaining file records and additions Stored in other disk sections (extents) Extents  Linked together with pointers  Physical size determined by operating system  Usually 256 bytes
  • 15. File extents linked in two ways Storage level  Each extent points to next one in sequence  Directory entry  Filename, storage location of first extent, location of last extent, total number of extents (not counting first) Directory level  Each extent listed with physical address, size, pointer to next extent  Null pointer indicates last one Advantage Eliminates external storage fragmentation Eliminates need for compaction Disadvantage No direct access support  Cannot determine specific record’s exact location
  • 16.
  • 17.
  • 18. 3) Linked list non-contiguous allocation (using index) Allows direct record access Brings pointers together  Links every extent file into index block Every file has own index block Disk sector addresses for file Lists entry in order sectors linked Supports sequential and direct access Does not necessarily improve storage space use Larger files experience several index levels