File Management.ppt_第1頁(yè)
File Management.ppt_第2頁(yè)
File Management.ppt_第3頁(yè)
File Management.ppt_第4頁(yè)
File Management.ppt_第5頁(yè)
已閱讀5頁(yè),還剩39頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、File Management,Lecture 3,What is a file?,File is term applied to anything held on secondary storage Includes programs (source and executable) text files such as word documents, spreadsheet files, database files etc.,File naming,MS DOS format is generally up to eight character name followed by a dot

2、 and then a three character extension. Example Letter1.doc , hello.exe , stock.dat Linux/Unix file naming is more flexible can have something like myfile.example.doc normally .bin files are equivelent to exe files in windows.,Objectives of O.S.,Hide complexity of how files are saved from user Proble

3、ms with physical addressing, perform error checking, i/o tasks to storage. Develop file management strategies Explore files and folders Create, name, copy, move, and delete folders Name, copy, move, and delete files Work with compressed files,Organizing Files and Folders,A file, or document, is a co

4、llection of data that has a name and is stored in a computer You organize files by storing them in folders Disks contain folders that hold documents, or files Floppy disks Zip disks Compact Discs (CDs) Hard Disks Removable disks are inserted into a drive,Organizing Files and Folders,Understanding th

5、e Need for Organizing Files and Folders,Windows organizes the folders and files in a hierarchy, or file system Windows stores folders and important files that it needs when you turn on the computer in the root directory Folders stored within other folders are called subfolders,Understanding the Need

6、 for Organizing Files and Folders,Directories,A directory is a logical grouping of files All modern operating systems have a directory structure Why security and housekeeping on system Example on Linux system only root user will have access to sbin directory.,Linux/Unix file structure,File Managemen

7、t System,Provides a logical view for the user and hides the physical implementation Where a file is located and how it is stored on disk is role of OS Manages directory structures and space allocation for each I/O device Permits manipulation of data within a file Requests data transfers from I/O dev

8、ice drivers File security and protection of file integrity,File Management and I/O Functions,Separation between the two allows I/O devices can change while keeping the file system the same Redirecting of data is simple,File Manager Request Handling,File Storage,Over time file sizes change this can b

9、e a problem for OS. As files reduce get deleted, compressed etc spaces develop on disk fragmentation. OS provides fixed size blocks for storing data, called cluster. Problem is clusters are often not sequential.,File Access Methods,Sequential Access File is read in sequence from beginning to end Maj

10、ority of all files Program source and binary files Random Access Assumes file is made up of fixed length logical records Hashing is a common method used to calculate the location of an internal logical record Indexed Access Additional means for accessing and viewing records in a file Key indexes,Phy

11、sical File Storage,Contiguous Non-contiguous Linked Indexed Examples DOS/Windows FAT UNIX i-nodes Windows NTFS Free space management,Contiguous Storage Allocation,Assign blocks (all in a row) to hold the file Access is simple for both sequential and random methods Disadvantages Space must be large e

12、nough Have to take into account file growth May need to be moved if it outgrows its space Fragmentation of disk Allocation strategies to minimize fragmentation First-fit, best-fit Eventually disk becomes fragmented,Contiguous Storage Allocation,Linked Allocation,Non-contiguous Each block contains a

13、link to the next physical block Variant links in both directions Advantages no fragmentation Adding to a file is easy Disadvantages Not usable for random access Additional disk head searching Overhead in storing the pointers Recovery of a defective block is difficult,Linked Allocation,MS-DOS FAT,Fil

14、e Allocation Table (FAT) Table contains the first block of each file on the disk or disk partition Successive blocks contain a link to the next block Requires a tremendous amount of space File integrity can be easily compromised,MS-DOS FAT,Linked Allocation and File Allocation Table,Indexed Allocati

15、on,Index blocks for indexed allocation of linked files shown in MS-DOS FAT example,Indexed Allocation,Non-contiguous All link pointers are stored together in a single block called the index block One index block per file Advantages No fragmentation Can be used for random access Disadvantage Slower d

16、ue to additional access of the index block Additional disk head searching Recovery of a defective block is difficult,Unix i-nodes,Indexed file allocation Index block contains File attributes 10 direct blocks 1 single indirect 1 double indirect 1 triple indirect Advantages Fast for small blocks Can a

17、ccommodate very large files 100s of gigabytes,Unix i-nodes,Windows 2000 - NTFS,Dynamically sized volumes Volumes may be a fraction of a disk or span many disks Master File Table (MFT) of 1kb records 1st 16 records are attributes of the MFT ie system files used to manage the volume Each file has an M

18、FT entry,NTFS Volume Layout,Other Secondary Storage Allocation,Tape Allocation Not practical to reallocate space in the middle of the tape Files that grow must be re-written Files are stored contiguously whenever possible CD-ROM and DVD-ROM Allocation Block system described in Chapter 10 Eight level

19、s of subdirectories Directory format similar to MS-DOS although extensions permit longer filenames and deeper subdirectory levels Files can be stored non-contiguously,Directory Structure,Provides a means of organization so that files can be located easily and efficiently Hide the physical devices fr

20、om the logical view of the files Partitions Independent subsections of a device Volume Directory structure for a particular partition Needs to be mounted to be incorporated into the overall file system structure Contain file attributes,Tree-Structure Directory,Hierarchical with a top-level root dire

21、ctory from which all other directories stem All directories and files have names Separator Used to indicate subdirectories and files located in a directory / UNIX DOS, Windows Pathname Absolute full pathname starting from the root directory Relative pathname is created starting from the current dire

22、ctory Search Paths Directory locations that the operating system uses to locate files,Tree-Structure Directory,Linux/Unix Tree Structure,RAID,Redundant Array of Independent Disks Redundant Array of Inexpensive Disks 6 levels in common use Not a hierarchy Set of physical disks viewed as single logica

23、l drive by O/S Data distributed across physical drives Can use redundant capacity to store parity information,RAID 0,No redundancy Data striped across all disks Round Robin striping Increase speed Multiple data requests probably not on same disk Disks seek in parallel A set of data is likely to be s

24、triped across multiple disks,RAID 1,Mirrored Disks Data is striped across disks 2 copies of each stripe on separate disks Read from either Write to both Recovery is simple Swap faulty disk & re-mirror No down time Expensive,RAID 2,Disks are synchronized Very small stripes Often single byte/word Error correction calculated across corresponding bits on disks Multiple parity disks store Hamming code error correction in corresponding positions Lots of redundancy Expensive Not used,RAID 3,Similar t

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論