SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally FILE SYSTEM.

Slides:



Advertisements
Similar presentations
File-System Interface
Advertisements

Chapter 10: File-System Interface
1 Chapter 11: File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection  Chapter.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
File Management Chapter 12. File Management A file is a named entity used to save results from a program or provide data to a program. Access control.
Chapter 10: File-System Interface
File System Interface CSCI 444/544 Operating Systems Fall 2008.
Dr. Kalpakis CMSC 421, Operating Systems. Fall File-System Interface.
1 File Management (a). 2 File-System Interface  File Concept  Access Methods  Directory Structure  File System Mounting  File Sharing  Protection.
04/02/2004CSCI 315 Operating Systems Design1 File System Interface.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
04/05/2010CSCI 315 Operating Systems Design1 Virtual Memory Wrap-up; File System Interface.
File Systems. 2 Storing Information Applications can store it in the process address space Why is it a bad idea? –Size is limited to size of virtual address.
1 Operating Systems Chapter 7-File-System File Concept Access Methods Directory Structure Protection File-System Structure Allocation Methods Free-Space.
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 10: File-System Objectives To discuss file-system design tradeoffs, including.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 10: File-System Interface File Concept.
1 Friday, July 07, 2006 “Vision without action is a daydream, Action without a vision is a nightmare.” - Japanese Proverb.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
File Concept l Contiguous logical address space l Types: Data: numeric, character, binary Program: source, object (load image) Documents.
Os111 Chapter 11 File-System Interface. os112 Outline File Concept Access Methods Directory Structure File System Mounting File Sharing Protection.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
File Concept §Contiguous logical address space §Types: l Data: Numeric Character Binary l Program.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10: File-System Interface.
Chapter 10 File System Interface
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 10: File-System Interface.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
Computer Studies (AL) File Management File system interface.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 10-1: File Systems Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Silberschatz, Galvin and Gagne  Operating System Concepts File Concept Contiguous logical address space Smallest user allocation Non-volatile.
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Chapter 10: File-System Interface 10.1 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts – 8 th Edition 2014.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
File System Interface. File Concept Access Methods Directory Structure File-System Mounting File Sharing (skip)‏ File Protection.
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Page 110/19/2015 CSE 30341: Operating Systems Principles Chapter 10: File-System Interface  Objectives:  To explain the function of file systems  To.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
Module 4.0: File Systems File is a contiguous logical address space.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 11: File-System Interface File Concept Access Methods Directory Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 10: File-System Interface File Concept.
Silberschatz and Galvin  Operating System Concepts Module 10: File-System Interface File Concept Access :Methods Directory Structure Protection.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
Operating Systems 1 K. Salah Module 4.0: File Systems  File is a contiguous logical address space (of related records)  Access Methods  Directory Structure.
Access Methods File store information When it is used it is accessed & read into memory Some systems provide only one access method IBM support many access.
Operating Systems Files, Directory and File Systems Operating Systems Files, Directory and File Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
Instructor: Umar KalimNUST Institute of Information Technology Operating Systems File System Interface.
W4118 Operating Systems Instructor: Junfeng Yang.
SVBIT SUBJECT:- Operating System TOPICS:- File Management
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
CSE Operating System Principles File Systems.
Lecture : chapter 9 and 10 file system 1. File Concept A file is a collection of related information defined by its creator. Contiguous logical address.
File System Interface CSSE 332 Operating Systems
Module 10: File-System Interface
Chapter 11: File-System Interface
Operating Systems (CS 340 D)
Operating Systems (CS 340 D)
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Chapter 10: File-System Interface
Files Management – The interfacing
Module 10: File-System Interface
Lecture 4: File-System Interface
Chapter 5 File Systems -Compiled for MCA, PU
Presentation transcript:

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally FILE SYSTEM

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File System is a mechanism which is provided by the operating system to store and retrieve files on the disk. This system is primarily responsible for the management and organization of various files in a system. Introduction

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally A file is a collection of related data stored as a named unit on the secondary storage. It can store different types of data, like text, graphics, database, executable code, sound, videos, etc and on the basis of the data, a file can be categorized as a data file, graphic file, database file, executable file, sound file, video file, etc. File Concept

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally A file in a system is identified by its name. The file name helps a user to locate a specific file in the system. Different operating systems follow different file naming conventions. File attributes help the file system to manage a file within the system. Files attributes may vary in different operating system. File Attributes

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes Helps to identify and locate a file in the system.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes Stores information about the current size of the file.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes Helps the operating system to recognize and use the recommended program to open a particular file type.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes A unique tag, usually a number that helps the file system to recognize the file within the file system.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes A pointer that stores location information of the device and location of the file on that device.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes Stores information such as date and time of creation, last modification and last use. This is useful for protection, security and monitoring.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Name Size Type Identifier Location Date and Time Protection File Attributes Stores information about the access permissions (read, write, execute) of different users.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File operations are the functions that can be performed on a file. Operating system handles the file operations through the use of system calls. Various operations that can be performed on a file are: Create a file Open a file Write to a file Read a file File Operations

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Seek file Close file Delete file Append file Rename file File Operations

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File operations are the functions that can be performed on a file. Operating system handles the file operations through the use of system calls. Various operations that can be performed on a file are: Create a file Open a file Write to a file Read a file File Operations “create” system call is used to create a file. When this system call is used, the operating system searches for the free space in the file system and allocates it to the file. In addition, the OS makes a directory entry to record the name, location and other information about the file.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File operations are the functions that can be performed on a file. Operating system handles the file operations through the use of system calls. Various operations that can be performed on a file are: Create a file Open a file Write to a file Read a file File Operations “open” system call accepts the file name and the access-mode as parameters to open a file and returns a pointer to the entry in the open-file table. The OS searches the directory entry for the file name and also checks the access permission.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File operations are the functions that can be performed on a file. Operating system handles the file operations through the use of system calls. Various operations that can be performed on a file are: Create a file Open a file Write to a file Read a file File Operations “write” system call accepts the file name and the data to be written to the file as parameters. The OS searches the directory entry to locate the file and writes data to the specified position in the file and also updates the write pointer to the location where next write operation is to take place.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File operations are the functions that can be performed on a file. Operating system handles the file operations through the use of system calls. Various operations that can be performed on a file are: Create a file Open a file Write to a file Read a file File Operations “read” system call accepts the file name, amount of data to be read and a read pointer to point to the position from where the data is to be read as parameters. The current position pointer will be updated after the read operation.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Seek file Close file Delete file Append file Rename file File Operations “seek” system call is used to position the pointer to a specific position in a file. Once the pointer is positioned, data can be read from and written to that position.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Seek file Close file Delete file Append file Rename file File Operations “close” system call is used to close a file, when all the operations on that file are completed. The OS erase the file entry from the open-file table to make space for the new file entries.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Seek file Close file Delete file Append file Rename file File Operations “delete” system call is used to delete a file, when a file is not required. The OS will erase its corresponding directory entry also.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Seek file Close file Delete file Append file Rename file File Operations “append” system call is used to add data at the end of an existing file. The system call works similar to the “write” system call, except that it positions the pointer to the end of the file and then performs the write operation.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Seek file Close file Delete file Append file Rename file File Operations “rename” system call is used to change the name of an existing file. The OS changes the directory entry also.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally The most common technique to implement file type is by providing extension to a file. The file name is divided into two parts separated by a period, where the first part is the name and the second part after the period is the file extension. A file extension is generally one to three characters long. The extension indicates the type of the file and the operations (read, write, execute) that can be performed on that file. File Types

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File Types

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally The information stored in the file can be accessed as follows: Sequential Access Direct Access Access Methods

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally The information stored in the file can be accessed as follows: Sequential Access Direct Access Access Methods Information from the file is accessed in order, one record after the other. Compilers, multimedia applications, sound files, etc. are the most common examples of programs using sequential access. In case of a read operation, the record at the location pointed by the file pointer is read and the file pointer is then advanced to the next record. In case of write operation, the record is written to the end of the file and pointer is advanced to end of new record. Information from the file is accessed in order, one record after the other. Compilers, multimedia applications, sound files, etc. are the most common examples of programs using sequential access. In case of a read operation, the record at the location pointed by the file pointer is read and the file pointer is then advanced to the next record. In case of write operation, the record is written to the end of the file and pointer is advanced to end of new record.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally The information stored in the file can be accessed as follows: Sequential Access Direct Access Access Methods Under direct access, a file is viewed as a sequence of blocks (or records) which are numbered. The records of a file can be read or written in any order using this number. The block number is relative to the beginning of the file. This relative number internally has an actual absolute disk address and this mapped by the file system. In direct access, the system calls for read and write operations are using the block number as parameter.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally To manage the data stored on a disk, the disk is divided into one more partitions also known as volumes and each partition contains information about the files in it. This information is stored in directory. Directory Structure

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Operations Performed on Directory  Search for a file  Create a file  Delete a file  List a directory  Rename a file  Traverse the file system It is possible to have more than one operating system on a single disk, where a user can boot any of the operating system.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Organize the Directory (Logically) to Obtain  Efficiency – locating a file quickly  Naming – convenient to users Two users can have same name for different files  Grouping – logical grouping of files by properties, (e.g., all Java programs, all games, …)

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Single-Level Directory  A single directory for all users Naming problem – No two files can have the same name. Grouping problem – Only one directory is available for all users.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Two-Level Directory  Separate directory for each user (MFD, UFD) n Path name n Can have the same file name for different user n Efficient searching n No grouping capability

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Tree-Structured Directories

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Protection The information stored in a system requires to be protected from the physical damage and unauthorized access. A file system can be damaged due to various reasons such as, a system breakdown, theft, fire, lightning or any other nature calamities.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Protection When the physical damage is irreversible, the data can be lost permanently. Physical damage to a system is unavoidable, we must take proper measures to safeguard and protect the data. Protection can be provided by storing a copy of information on the disk to the disk itself, or to some other removable storage media.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Protection Apart, from protecting the file from physical damage, the file in a system also needs a protection mechanism to control improper access. In a multi-user system, one user can access files of other users, and the system is prone to improper access. A protection mechanism is necessary in such a situation.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Types of Access Different access rights that can be assigned to a particular user for a particular file are:  Read – Allow only reading the file.  Write – Allow write or rewriting the file.  Execute – Allow running the program or application.  Append – Allow writing new information at the end of file.  Copy – Allow creating a new copy of the file.  Rename – Allow renaming a file.  Edit – Allow adding or deleting information from the file.  Delete – Allow deleting the file and releasing the space.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally Access Control Access control is to protect the file from improper accesses.  Password  Access Control List (ACL) To resolve the problems associated with ACL, the users can be categorized as:  Owner  Group  Universe

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File System Structure File system helps to organize, manage and retrieve data on the disk. The file system resides permanently on the disk. Two key issues in the design of file system:  Defining a file and attributes, operations that can be performed on a file and the directory structure.  Creating data structures and algorithms for mapping the logical file system into the secondary storage device.

SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally File System Layers