Operating Systems File systems

Slides:



Advertisements
Similar presentations
Disk Storage, Basic File Structures, and Hashing
Advertisements

Section 6.2. Record data by magnetizing the binary code on the surface of a disk. Data area is reusable Allows for both sequential and direct access file.
Types Of Storage Device
Chapter 4 : File Systems What is a file system?
Allocation Methods - Contiguous
Chapter 10: File-System Interface
File Management Systems
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
1 Chapter 6 Storage and Multimedia: The Facts and More.
Connecting with Computer Science, 2e
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.
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
DISK STORAGE IBM 305 RAMAC, MB on inch disks
METU Department of Computer Eng Ceng 302 Introduction to DBMS Disk Storage, Basic File Structures, and Hashing by Pinar Senkul resources: mostly froom.
Ceng Operating Systems
1 Friday, July 07, 2006 “Vision without action is a daydream, Action without a vision is a nightmare.” - Japanese Proverb.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 13 Disk Storage, Basic File Structures, and Hashing.
Chapter 12 File Management Systems
COMP5102 Lecture 3 Operating Systems (OS) File systems phones off (please)
DISK STORAGE INDEX STRUCTURES FOR FILES Lecture 12.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Chapter 10 File System Interface
Objectives Learn what a file system does
Computer Systems Week 10: File Organisation Alma Whitfield.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 17 Disk Storage, Basic File Structures, and Hashing.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
1Fall 2008, Chapter 11 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
Lecture 9: The FAT and VFAT Filesystems 6/16/2003 CSCE 590 Summer 2003.
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
Components & Mechanism. People & Computers Hard Disk What purpose does it serve?
Component 4: Introduction to Information and Computer Science Unit 4: Application and System Software Lecture 3 This material was developed by Oregon Health.
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.
File Systems (1). Readings r Reading: Disks, disk scheduling (3.7 of textbook; “How Stuff Works”) r Reading: File System Implementation ( of textbook)
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
GENERAL INFORMATION Invented in 1950's on mainframe computers with 20 inches diameter with only few megabytes of data. Originally called 'Fixed Disc'
Operating Systems COMP 4850/CISG 5550 File Systems Files Dr. James Money.
Chapter 13 Disk Storage, Basic File Structures, and Hashing. Copyright © 2004 Pearson Education, Inc.
File Structures. 2 Chapter - Objectives Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and.
File system.
Lecture 18 Windows – NT File System (NTFS)
Copyright © Curt Hill Disk Basics Structure and Characteristics of Secondary Storage.
Chapter 6 File Systems. Essential requirements 1. Store very large amount of information 2. Must survive the termination of processes persistent 3. Concurrent.
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.
Section 13.2 – Secondary storage management. Index 13.2 Disks Mechanics of Disks The Disk Controller Disk Access Characteristics.
Chapter 5 Record Storage and Primary File Organizations
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
W4118 Operating Systems Instructor: Junfeng Yang.
SVBIT SUBJECT:- Operating System TOPICS:- File Management
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 11: File System Implementation.
Chapter 11: File System Implementation
Backing Store.
I/O Resource Management: Software
9/12/2018.
Lecture 45 Syed Mansoor Sarwar
File Management.
Disk Storage, Basic File Structures, and Hashing
Disk Storage, Basic File Structures, and Buffer Management
Disk storage Index structures for files
Module 2: Computer-System Structures
Secondary Storage Management Brian Bershad
Chapter 16 File Management
Lesson 9 Types of Storage Devices.
Secondary Storage Management Hank Levy
Module 2: Computer-System Structures
Department of Computer Science
Networks & I/O Devices.
Chapter 5 File Systems -Compiled for MCA, PU
Presentation transcript:

Operating Systems File systems phones off (please) CSCI2413 Lecture 7 Operating Systems File systems

Lecture Outline File management File Types File Access File Structure Unix file types File Access File Structure Disk Construction File Allocation Tables © De Montfort University, 2004/5 CSCI2413 - L7

File Management Files exist to store information and allow it to be retrieved later. The OS must set up a management system to provide facilities for general users to carry out a range of file handling processes such as: create a file, delete a file, copy a file identify a file type, name a file, rename a file, display the contents of a file, create/remove/list logical groups of files e.g. folders, directories specify locations of files protect files from unauthorised access. © De Montfort University, 2004/5 CSCI2413 - L7

File Management Also programmers will want to carry out file handling processes such as: Open: a file Close: a file Read: data from a file Write: data to a file Seek: a particular place in a file for subsequent data transfer. © De Montfort University, 2004/5 CSCI2413 - L7

File System, Hierarchical or Tree structure © De Montfort University, 2004/5 CSCI2413 - L7

File Types A file may have a specific type or purpose, e.g. regular files, directories, character/block special files, pipes Some systems have specific types for things like ASCII (text) files executable (machine code) files File types may be enforced MS-DOS executable must have ‘.exe’ extension or not (they are just a hint to the user) UNIX text files may have ‘.txt’ extension File types may have associations Apple Mac types associate a file with its creator © De Montfort University, 2004/5 CSCI2413 - L7

File Types – Name, Extension © De Montfort University, 2004/5 CSCI2413 - L7

Unix File Types Four basic types: Regular Files Directory Files may contain text, a program, or other data, either in ASCII, in the numerical range 0 to 127, i.e. in the 7-bit range or a binary file, whose bytes can be of all possible values 0 to 255, in the 8-bit range. Directory Files A directory containing files within a directory E.g. directory x may contain a, b and c, and that b is a directory, containing files u and v. b can be viewed as a directory, containing files and as a file itself. © De Montfort University, 2004/5 CSCI2413 - L7

Unix File Types …. Device Files Link Files In Unix, physical devices (printers, terminals etc.) are represented as ``files.'' In his way, the same read() and write() functions used to read and write real files can also be used to read from and write to these devices. Link Files new name for another file suppose we have a file X, and type ln X Y If we then run ls, it will appear that a new file, Y, has been created, as a copy of X, © De Montfort University, 2004/5 CSCI2413 - L7

File Access Methods There are two distinct classes of access method sequential access suited to magnetic tape devices the information in a file (bytes or records) can only be written at the end (appended) or read in sequential order random access suited to hard disks bytes or records can be read or written in any order sometimes this is implemented by each read and write operation specifying a position parameter, or © De Montfort University, 2004/5 CSCI2413 - L7

File System Structure Hard disks provide the bulk of secondary storage on which a file system is maintained to improve input / output efficiency, I/O transfers are performed in units of blocks Each block consists of one or more physical hard disk sectors typical physical sector sizes vary from 32 to 4K bytes usually, particularly on PC’s, sectors are 512 bytes Hard disks have two important characteristics blocks can be read, modified and written (in place) blocks can be directly accessed in any order © De Montfort University, 2004/5 CSCI2413 - L7

File System Layers In order to provide convenient and efficient user access to the disk, the operating system imposes a file system structure this generally comprises a number of layers to insulate the logical structure from device dependencies application programs logical file system (files, directories, etc) basic file system (block read & write) I/O control (interrupts, device drivers) hardware devices © De Montfort University, 2004/5 CSCI2413 - L7

Disk Construction A hard disk consists of a number of platters made of aluminium or glass with a thin magnetic film on the surface common platter diameters range from 1.8 - 5.25 inches Information is stored magnetically on both surfaces (sides) of each platter The platters rotate at a fixed rate on the spindle e.g. modern PC drives rotate at 5,400 or 7,200 rpm © De Montfort University, 2004/5 CSCI2413 - L7

Read / Write Heads Each surface has a read/write head to access the magnetic fields the heads are mounted on arms and their movement is controlled by an actuator all the heads move together side view r/w heads arms actuator The heads do not touch the surface, but ‘fly’ a very small distance above the surface the fly height typically between around 0.2 to 0.07 mm © De Montfort University, 2004/5 CSCI2413 - L7

The Disk Surface The surface of a disk is logically divided into concentric circular tracks 1,000’s are now common The surface is also divided into segments a track through a particular segment is a sector note: often the term sector is confusingly used to refer to both segments and sectors! on typical PC disks, each sector holds 512 bytes © De Montfort University, 2004/5 CSCI2413 - L7

data capacity of a disk is described best by: Disk Capacity = Cylinders * Heads * Sectors * (# bytes / disk block) A typical example for a 2.1 GB IDE disk on a Linux-based PC would be: C/H/S = 1024/64/63 Disk Capacity = 1024 * 64 * 63 * 512 bytes/block = 2113929216 bytes = 2.11 gigabytes © De Montfort University, 2004/5 CSCI2413 - L7

File Allocation Tables The FAT is an index array of linked-list block numbers kept in its own disk block the FAT contents are critical to finding all file blocks, so it is (usually) held twice at the start of each partition the root directory immediately follows the FATs The directory entry holds the start block of a file the FAT entry indexed by that block number contains the block number of the next block in the chain there is a special value to signify end of file Special values signify free blocks and bad blocks © De Montfort University, 2004/5 CSCI2413 - L7

File Systems in Unix In Unix, the files are organized into a tree structure with a root named by the character '/'. The first few levels of the tree look like this: © De Montfort University, 2004/5 CSCI2413 - L7

Summary File system, The system that an operating system or program uses to organize and keep track of files. For example, a hierarchical file system is one that uses directories to organize files into a tree structure. Although the operating system provides its own file management system, you can buy separate file management systems. These systems interact smoothly with the operating system but provide more features, such as improved backup procedures and stricter file protection. © De Montfort University, 2004/5 CSCI2413 - L7