Chapter 11 File Systems and Directories Nell Dale John Lewis.

Slides:



Advertisements
Similar presentations
File-System Interface
Advertisements

Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
Chapter 4 : File Systems What is a file system?
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.
Chapter 10: File-System Interface
Dr. Kalpakis CMSC 421, Operating Systems. Fall File-System Interface.
Chapter 11 File Systems and Directories. 2 File Systems File: A named collection of related data. File system: The logical view that an operating system.
04/02/2004CSCI 315 Operating Systems Design1 File System Interface.
File System CS105. File Systems A method of storing and organizing computer files and their data Usually reside on secondary storage devices – Hard disks.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 10: File-System Interface.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
11/7/06 1 Hofstra University - CSC005 Chapter 11 File Systems and Directories.
1 Operating Systems Chapter 7-File-System File Concept Access Methods Directory Structure Protection File-System Structure Allocation Methods Free-Space.
Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
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.
File Concept l Contiguous logical address space l Types: Data: numeric, character, binary Program: source, object (load image) Documents.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10: File-System Interface.
Chapter 10 File System Interface
Chapter 11 File Systems and Directories Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 10: File-System Interface.
Computer Systems Week 10: File Organisation Alma Whitfield.
Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
CS105 INTRODUCTION TO COMPUTER CONCEPTS OPERATING SYSTEMS LAYER Instructor: Cuong (Charlie) Pham.
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.
Chapter 11 File Systems and Directories. 2 File Systems File: A named collection of related data. File system: The logical view that an operating system.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
Describe the purpose of files, file systems, and directories Distinguish between text and binary files Identify various file types by their extensions.
Chapter 11 File Systems and Directories. 2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary.
CS 1308 Computer Literacy and the Internet File Systems and Directories.
CPS120: Introduction to Computer Science File Systems and Directories Nell Dale John Lewis.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
CS 346 – Chapter 11 File system –Files –Access –Directories –Mounting –Sharing –Protection.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 10: File-System Interface File Concept.
A little hardware; a little software CS 139 – 08/29/07.
Chapter 11 File Systems and Directories. Chapter Goals Files, directories, and file systems Text and Binary files Disk-scheduling algorithms 11-2.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Chapter 11 File Systems and Directories. 2 File Systems (Chapter 11.1) File: 1. A named collection of related data. 2.smallest amount of information that.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally FILE SYSTEM.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 11: File-System Interface File Concept Access Methods Directory Structure.
SVBIT SUBJECT:- Operating System TOPICS:- File Management
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Operating System Architecture
Chapter 13: File-System Interface
Module 10: File-System Interface
Chapter 11: File-System Interface
File Systems and Directories
Secondary Storage Management Brian Bershad
Week 1: File Systems and Directories
Chapter 10: File-System Interface
Files Management – The interfacing
Algorithms File Systems Lab Environment.
Secondary Storage Management Hank Levy
Module 10: File-System Interface
Lecture 4: File-System Interface
Presentation transcript:

Chapter 11 File Systems and Directories Nell Dale John Lewis

11-2 Chapter Goals Describe the purpose of files, file systems, and directories Distinguish between text and binary files Identify various file types by their extensions Explain how file types improve file usage Define the basic operations on a file

11-3 Chapter Goals (cont.) Compare and contrast sequential and direct file access Discuss the issues related to file protection Describe a directory tree Create absolute and relative paths for a directory tree Describe several disk-scheduling algorithms

11-4 File Systems A file is a named collection of related data A file system is the logical view that an operating system provides so that users can manage information as a collection of files A file system is often organized by grouping files into directories

11-5 Text and Binary Files In a text file the bytes of data are organized as characters from the ASCII or Unicode character sets A binary file requires a specific interpretation of the bits based on the information in the file

11-6 Text and Binary Files The terms text file and binary file are somewhat misleading They seem to imply that the information in a text file is not stored as binary data Ultimately, all information on a computer is stored as binary digits These terms refer to how those bits are formatted: as chunks of 8 or 16 bits, interpreted as characters, or in some other special format

11-7 File Types Most files, whether they are in text or binary format, contain a specific type of information –For example, a file may contain a Java program, a JPEG image, or an MP3 audio clip The kind of information contained in a document is called the file type –Most operating systems recognize a list of specific file types

11-8 File Types File names are often separated, usually by a period, into two parts –Main name –File extension The file extension indicates the type of the file Figure 11.1 Some common file types and their extensions

11-9 File Operations Create a file Delete a file Open a file Close a file Read data from a file Write data to a file Reposition the current file pointer in a file Append data to the end of a file Truncate a file (delete its contents) Rename a file Copy a file

11-10 File Access Figure 11.2 Sequential file access

11-11 File Access The most common access technique, and the simplest to implement, is sequential access –It requires that the information in the file be processed in order –Read and write operations move the current file pointer according to the amount of data that is read or written

11-12 File Access Files with direct access are conceptually divided into numbered logical records Direct access allows the user to set the file pointer to any particular record by specifying the record number

11-13 File Access Figure 11.3 Direct file access

11-14 File Protection In multiuser systems, file protection is of primary importance We don’t want one user to be able to access another user’s files unless the access is specifically allowed A file protection mechanism determines who can use a file and for what general purpose

11-15 File Protection A file’s protection settings in the Unix operating system is divided into three categories –Owner –Group –World Page 356

11-16 Directory Trees A directory of files can be contained within another directory –The directory containing another is usually called the parent directory, and the one inside is called a subdirectory A file system is often viewed as a directory tree The directory at the highest level is called the root directory

11-17 Directory Trees Figure 11.4 A Windows directory tree

11-18 Directory Trees At any point in time, you can be thought of as working in a particular location (that is, a particular subdirectory) This subdirectory is referred to as the current working directory

11-19 Figure 11.5 A Unix Directory Tree

11-20 Path Names To indicate a particular file using text, we specify that file’s path, which is the series of directories through which you must go to find the file An absolute path name begins at the root and specifies each step down the tree until it reaches the desired file or directory A relative path name begins from the current working directory

11-21 Path Names Examples of absolute path C:\Program Files\MS Office\WinWord.exe C:\My Documents\letters\applications\vaTech.doc C:\Windows\System\QuickTime Suppose the current working directory is C:\My Documents\letters Then the following relative path names could be used cancelMag.doc applications\calState.doc

11-22 Disk Scheduling File systems must be accessed in an efficient manner As a computer deals with multiple processes over a period of time, a list of requests to access the disk builds up The technique that the operating system uses to determine which requests to satisfy first is called disk scheduling

Disk Scheduling Figure 11.5 A magnetic disk drive

11-24 Disk Scheduling First-Come, First-Served Disk Scheduling –In FCFS, we process the requests in the order they arrive, without regard to the current position of the heads The shortest-seek-time-first (SSTF) disk- scheduling algorithm moves the heads the minimum amount it can to satisfy any pending request

11-25 Disk Scheduling SCAN Disk Scheduling –An elevator is designed to visit floors that have people waiting. In general, an elevator moves from one extreme to the other (say, the top of the building to the bottom), servicing requests as appropriate. –The SCAN disk-scheduling algorithm works in a similar way, except instead of moving up and down, the read/write heads move in toward the spindle, then out toward the platter edge, then back toward the spindle, and so forth.

11-26 Ethical Issues: Computer Viruses and Denial of Service In the spring of 2000 the “Love Bug” computer virus caused an estimated 10 billion dollars worth of damage When executed, a virus sweeps through files, modifying or erasing them; it usually also sends itself to the addresses it accessed

11-27 Ethical Issues: Computer Viruses and Denial of Service Denial of Service (DoS) attacks are not viruses but are a method hackers use to deprive the user or organization of services DoS attacks usually just flood the server’s resources, making the system unusable Scanning for viruses, taking proper precautions when downloading material, and investigating attachments before opening them are useful ways to protect your computer