O.S Lecture 14 File Management.

Slides:



Advertisements
Similar presentations
Disk Scheduling Based on the slides supporting the text 1.
Advertisements

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, Chapter 12: Mass-Storage Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File-System Interface.
Based on the slides supporting the text
Operating Systems File systems
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
Chapter 12 File Management Systems
Silberschatz, Galvin and Gagne  Operating System Concepts Common System Components Process Management Main Memory Management File Management.
4.0 : File Management.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 12: Mass-Storage Systems Overview of Mass.
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 12: Mass-Storage.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Page 110/19/2015 CSE 30341: Operating Systems Principles Chapter 10: File-System Interface  Objectives:  To explain the function of file systems  To.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
10.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 10.4 File System Mounting A file system must be mounted before it can be accessed.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
14.1/21 Part 5: protection and security Protection mechanisms control access to a system by limiting the types of file access permitted to users. In addition,
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 10 & 11: File-System Interface and Implementation.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 10-2: File Systems Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
System Components Operating System Services System Calls.
( ) 1 Chapter # 8 How Data is stored DATABASE.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 11: File System Implementation.
File-System Management
Computer System Structures Storage
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Chapter 2: Computer-System Structures
Lecture 16: Data Storage Wednesday, November 6, 2006.
I/O System Chapter 5 Designed by .VAS.
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Chapter 2: System Structures
Chapter 12: Mass-Storage Structure
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Lecture 45 Syed Mansoor Sarwar
Lecture 11: DMBS Internals
Chapter 14 Based on the slides supporting the text
Chapter 12: Mass-Storage Systems
Overview of Mass Storage Structure
Operating Systems (CS 340 D)
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Chapter 2: System Structures
Overview Continuation from Monday (File system implementation)
Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the.
Secondary Storage Management Brian Bershad
Mass-Storage Systems.
Chapter 2: Operating-System Structures
Chapter 2: The Linux System Part 5
Outline Chapter 2 (cont) OS Design OS structure
Chapter 12: Mass-Storage Structure
Secondary Storage Management Hank Levy
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Chapter 2: Operating-System Structures
Mass-Storage Systems (Disk Scheduling)
Lecture 4: File-System Interface
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

O.S Lecture 14 File Management

Your task Examine what the operating system must do to perform the basic file operations.

File Sharing User-oriented operating systems must accommodate the need to share files in spite of the inherent difficulties. Multiple Users When an operating system accommodates multiple users, the issues of file sharing, file naming, and file protection become preeminent.

Given a directory structure that allows files to be shared by users, the system must mediate the file sharing. The system can either allow a user to access the files of other users by default or require that a user specifically grant access to the files. These are the issues of access control and protection

To implement sharing and protection, the system must maintain more file and directory attributes than are needed on a single-user system. The user who can change attributes and grant access and who has the most control over the file is called the owner. The subset of users who can share access to the file is called the group.

For example, the owner of a file on a UNIX system can issue all operations on a file, while members of the file's group can execute one subset of those operations, and all other users can execute another subset of operations. Exactly which operations can be executed by group members and other users is definable by the file's owner.

Remote File Systems Networking allows the sharing of resources spread across a campus or even around the world. One obvious resource to share is data in the form of files. Remote file-sharing methods have evolved with time. The first implemented method involves manually transferring files between machines via programs like ftp. The second major method uses a distributed file system (DFS) in which remote directories are visible from a local machine. In some ways, the third method, the is a reversion to the first. A browser is needed to gain access to the remote files, and separate operations (essentially a wrapper for ftp) are used to transfer files.

Protection When information is stored in a computer system, we want to keep it safe from physical damage (the issue of reliability) and improper access (the issue of protection). Reliability is generally provided by duplicate copies of files. Many computers have systems programs that automatically (or through computer-operator intervention) copy disk files to tape at regular intervals (once per day or week or month) to maintain a copy should a file system be accidentally destroyed.

File systems can be damaged by hardware problems (such as errors in reading or writing), power surges or failures, head crashes, dirt, temperature extremes, and vandalism. Files may be deleted accidentally. Bugs in the file-system software can also cause file contents to be lost. Protection can be provided in many ways. For a small single-user system, we might provide protection by physically removing the disks and locking them in a desk drawer or file cabinet. In a multiuser system, however, other mechanisms are needed.

Several different types of operations may be controlled: Protection mechanisms provide controlled access by limiting the types of file access that can be made. Access is permitted or denied depending on several factors, one of which is the type of access requested. Several different types of operations may be controlled: Read. Read from the file. Write. Write or rewrite the file. Execute. Load the file into memory and execute it. Append. Write new information at the end of the file. Delete. Delete the file and free its space for possible reuse. List. List the name and attributes of the file.

Controlled Access The most common approach – user identification The most general scheme – use of user access list (ACL) specifying user names and the types of access allowed for each user. User requests access to file → operating system checks the access list associated with that file. If that user is listed for the requested file access → access is allowed. Otherwise → a protection violation occurs → user job is denied access to the file.

Many systems recognize three classifications of users in connection with each file: Owner. The user who created the file is the owner. Group. A set of users who are sharing the file and need similar access is a group, or work group. Universe. All other users in the system constitute the universe.

Consider a person, Sara, who is writing a new book Consider a person, Sara, who is writing a new book. She has hired three graduate students (Jim, Dawn, and Jill) to help with the project. The text of the book is kept in a file named book. The protection associated with this file is as follows:

Sara should be able to invoke all operations on the file. Jim, Dawn, and Jill should be able only to read and write the file; they should not be allowed to delete the file. All other users should be able to read, but not write, the file. (Sara is interested in letting as many people as possible read the text so that she can obtain feedback.)

To achieve such protection, we must create a new group-say, text with members Jim, Dawn, and Jill. The name of the group, text, must then be associated with the file book, and the access rights must be set in accordance with the policy we have outlined. A file can only be in one group so for visitors there will be need to create additional access control list functionalities with the relevant access controls e.g. access to only a single chapter of the book.

Other Protection Approaches Passwords

Disk Management

Magnetic disks provide the bulk of secondary storage for modern computer systems. Magnetic tape was used as an early secondary-storage medium. Although it is relatively permanent and can hold large quantities of data, its access time is slow compared with that of main memory and magnetic disk.

In addition, random access to magnetic tape is about a thousand times slower than random access to magnetic disk, so tapes are not very useful for secondary storage. Tapes are used mainly for backup, for storage of infrequently used information, and as a medium for transferring information from one system to another.

Disk Scheduling One of the responsibilities of the operating system is to use the hardware efficiently. For the disk drives, meeting this responsibility entails having fast access time and large disk bandwidth.

The access time has two major components: Seek time: the time for the disk arm to move the heads to the cylinder containing the desired sector. Rotational latency: is the additional time for the disk to rotate the desired sector to the disk head. Bandwidth is the total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer.

We can improve both the access time and the bandwidth by managing the order in which disk I/O requests are serviced. Whenever a process needs I/0 to or from the disk, it issues a system call to the operating system.

The request specifies several pieces of information: Whether this operation is input or output What the disk address for the transfer is What the memory address for the transfer is What the number of sectors to be transferred is

If the desired disk drive and controller are available, the request can be serviced immediately. If the drive or controller is busy, any new requests for service will be placed in the queue of pending requests for that drive. For a multiprogramming system with many processes, the disk queue may often have several pending requests.

Thus, when one request is completed, the operating system chooses which pending request to service next. How does the operating system make this choice? Any one of several disk-scheduling algorithms can be used

Next Lecture Disk Scheduling algorithms System Protection and Security