Presentation is loading. Please wait.

Presentation is loading. Please wait.

It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have.

Similar presentations


Presentation on theme: "It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have."— Presentation transcript:

1

2 It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have third part: partitions – used to separate physically & logically large collection of directories File protection – multiple users access the file

3  File Concept  Access Methods  Directory Structure  File-System Mounting  File Sharing  Protection

4  To explain the function of file systems  To describe the interfaces to file systems  To discuss file-system design tradeoffs, including access methods, file sharing, file locking, and directory structures  To explore file-system protection

5  Storage media : magnetic disk, magnetic tapes, optical disks….  Os provides logical view of information storage  It abstracts from the physical properties of its storage devices to define a logical unit (file)  Files are mapped by os onto physical devices  Storage devices are non volatile – persistent through power failures  File – a named collection of related information that is recorded on the secondary storage  User s perspective – smallest allotment of logical storage

6  Contiguous logical address space  Types: ◦ Data files  numeric  Character  alphanumeric  binary ◦ Program files ◦ Text files (free forms)

7  Information in the file is defined by its creator  sequence of words, bytes, bits, lines & records (source, object, pay roll, text, graphics)  Simple record structure ◦ Lines ◦ Fixed length ◦ Variable length  Complex Structures ◦ Formatted document ◦ Relocatable load file  Can simulate last two with first method by inserting appropriate control characters

8  Text files – sequence of characters organized into lines  Source files – sequence of subroutines & lines, further organized into executable statements  Object file – sequence of bytes organized into blocks understandable by system linker\  Executable file – series of code sections that the loader can bring into memory & execute

9  Name – only information kept in human-readable form  Identifier – unique tag (number) identifies file within file system  Type – needed for systems that support different types  Location – pointer to file location on device  Size – current file size  Protection – controls who can do reading, writing, executing  Time, date, and user identification – data for protection, security, and usage monitoring  Information about files are kept in the directory structure, which is maintained on the disk

10  File is an abstract data type  Operations on file:  Create – space in file system & entry for new file  Write – name of the file & information to be written on the file  Read – name of the file & read pointer  Reposition within file – file seek (repositioning within a directory)  Delete – name of the file  Truncate – erasing the contents but keeping the attributes  File table:  Open(F i ) – search the directory structure on disk for entry F i, and move the content of entry to memory  Close (F i ) – move the content of entry F i in memory to directory structure on disk

11  Several pieces of data are needed to manage open files: ◦ File pointer: pointer to last read/write location, per process that has the file open ◦ File-open count: counter of number of times a file is open – to allow removal of data from open-file table when last processes closes it ◦ Disk location of the file: cache of data access information ◦ Access rights: per-process access mode information

12  Provided by some operating systems and file systems  Mediates access to a file  Mandatory or advisory: ◦ Mandatory – access is denied depending on locks held and requested ◦ Advisory – processes can find status of locks and decide what to do

13

14 Macintosh os- supports a minimal no of file structure It expects files to contain 2 parts: resource fork – information of interest to user data fork – program code or data

15 Physical record size will exactly match the length of the desired logical record Logical records may even vary in length Packing – no.of logical records into physical blocks Example – unix files – stream of bytes file system automatically packs & unpacks bytes into physical disk blocks – 512 bytes per block Conversion of physical to logical is a simple sw problem disk space – always allocated in blocks some portion of last block – generally wasted wasted bytes allocated to keep everything in units of blocks is internal fragmentation Block size is directly proportional to internal fragmentation


Download ppt "It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have."

Similar presentations


Ads by Google