Objectives Learn what a file system does

Slides:



Advertisements
Similar presentations
Chapter 12: File System Implementation
Advertisements

File Management.
COMP091 – Operating Systems 1
Chapter 4 : File Systems What is a file system?
File Management Lecture 3.
File Systems Examples.
Chapter 10: File-System Interface
FILE SYSTEMS. File Names 1 to 255 characters in length  This includes the path You can use uppercase and lowercase (case-aware, but not case-sensitive)
Lecture 10: The FAT, VFAT, and NTFS Filesystems 6/17/2003 CSCE 590 Summer 2003.
Connecting with Computer Science, 2e
1 Operating Systems Chapter 7-File-System File Concept Access Methods Directory Structure Protection File-System Structure Allocation Methods Free-Space.
Operating Systems File systems
METU Department of Computer Eng Ceng 302 Introduction to DBMS Disk Storage, Basic File Structures, and Hashing by Pinar Senkul resources: mostly froom.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 13 Disk Storage, Basic File Structures, and Hashing.
Operating Systems File systems
Wince File systems. File system on embedded File system choice on embedded is important –File system size can be an issue –Different media are used –
5.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 5: Working with File Systems.
Hard Drive Formatting 1. Formatting Once a hard drive has been partitioned, there’s one more step you must perform before your OS can use that drive:
Chapter 4: Operating Systems and File Management 1 Operating Systems and File Management Chapter 4.
Mastering Windows Network Forensics and Investigation Chapter 7: Windows File Systems.
LIS508 lecture 5: storage devices Thomas Krichel
Chapter 8 File Management
Presented to: Sir Ahmad Karim
Disk Structures. CTEC 1102 Formatting a Disk Two parts to formatting a disk:  Low-level (physical) formatting  High level (logical) formatting Low-level.
 FILE S SYSTEM  DIFFERENT FILE SYSTEMS  FILE SYSTEM COMPONENTS  FILE OPERATIONS  LOG STRUCTERD FILE SYSTEM  FILE EXAMPLES.
Chapter 5 Part 2 Secondary Storage Mgt. File Mgt. in Popular OSs
File Systems (1). Readings r Silbershatz et al: 10.1,10.2,
File Organization Techniques
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 17 Disk Storage, Basic File Structures, and Hashing.
Mastering Windows Network Forensics and Investigation Chapter 7: Windows File Systems.
Window NT File System JianJing Cao (#98284).
File Systems Long-term Information Storage Store large amounts of information Information must survive the termination of the process using it Multiple.
Component 4: Introduction to Information and Computer Science Unit 4: Application and System Software Lecture 3 This material was developed by Oregon Health.
Disk Fragmentation 1. Contents What is Disk Fragmentation Solution For Disk Fragmentation Key features of NTFS Comparing Between NTFS and FAT 2.
Bits, Bytes, Files, Hard Drives. Bits, Bytes, Letters and Words ● Bit – single piece of information ● Either a 0 or a 1 ● Byte – 8 bits of information.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
File System Management File system management encompasses the provision of a way to store your data in a computer, as well as a way for you to find and.
Data Structure & File Systems Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
Chapter 3 Partitioning Drives using NTFS and FAT32 Prepared by: Khurram N. Shamsi.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 11: File System Implementation.
MCSE Guide to Microsoft Windows Vista Professional Chapter 5 Managing File Systems.
Practical PC, 7 th Edition Chapter 4: File Basics.
File Structures. 2 Chapter - Objectives Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and.
Chapter 16 File Management The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander John.
Lecture 18 Windows – NT File System (NTFS)
FILE SYSTEMS. Presented to: Sir. Ahmad Kareem Presented by: Sadia Rasheed Bsit
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Chapter 6 File Systems. Essential requirements 1. Store very large amount of information 2. Must survive the termination of processes persistent 3. Concurrent.
NTFS Filing System CHAPTER 9. New Technology File System (NTFS) Started with Window NT in 1993, Windows XP, 2000, Server 2003, 2008, and Window 7 also.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #8 File Systems September 22, 2008.
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
Chapter 5 Record Storage and Primary File Organizations
Hands-On Microsoft Windows Server 2008 Chapter 7 Configuring and Managing Data Storage.
W4118 Operating Systems Instructor: Junfeng Yang.
( ) 1 Chapter # 8 How Data is stored DATABASE.
File-System Management
Disks and Formatting Ch 3.
Chapter 11: File System Implementation
Indexing and hashing.
Operating Systems (CS 340 D)
Windows XP File Systems
File Management Chase Goehring.
File Management.
Chapter 11: File System Implementation
File Managements.
Files Management – The interfacing
Chapter 16 File Management
File System Implementation
Chapter 5 File Systems -Compiled for MCA, PU
Presentation transcript:

Objectives Learn what a file system does Understand the FAT file system and its advantages and disadvantages Understand the NTFS file system and its advantages and disadvantages Compare various file systems Connecting with Computer Science

Objectives (continued) Learn how sequential and random file access work See how hashing is used Understand how hashing algorithms are created Connecting with Computer Science

What Does a File System Do? Responsible for creating, manipulating, renaming, copying, and removing files to and from a storage device Organizes files into common storage units called directories Keeps track of where files and directories are located Assists users by relating files and folders to the physical structure of the storage medium Connecting with Computer Science

Figure 10-1: Files and directories in a file system are similar to documents and folders in a filing cabinet Connecting with Computer Science

Storage Mediums A hard disk, or drive, is the most common storage medium for a file system Physically organized into tracks and sectors Read/write heads move over specified areas of the hard disks to store (write) or retrieve (read) data Random access device Can read or write data directly anywhere on the disk Faster than sequential access, which reads and writes from beginning to end Makes use of the file system to organize files Connecting with Computer Science

Hard disk platters are divided into tracks and sectors and Figure 10-3 Hard disk platters are divided into tracks and sectors and read/write heads store and retrieve data Connecting with Computer Science

File Systems and Operating Systems The type of file management system is dependent on the operating system FAT (file allocation table) Used from MS-DOS to Windows ME NTFS (New Technology File System) Default for Windows NT through Windows 2003 Unix and Linux support several file systems XFS, JFS, ReiserFS, ext3, and others HFS+ The current Mac OS X file system Connecting with Computer Science

FAT Groups hard drive sectors into clusters Increases performance by organizing blocks of sectors contiguously Maintains the relationship between files and clusters being used for the file Clusters have two entries in the table Current cluster information Link to the next cluster or a special code indicating it is the last cluster Keeps track of writable clusters and bad clusters Connecting with Computer Science

Sectors are grouped into clusters on a hard disk Figure 10-4 Sectors are grouped into clusters on a hard disk Connecting with Computer Science

FAT (continued) Organizes the hard drive into Partition boot record Contains information on how to access the volume with a file system Main and backup FAT If an error occurs in reading the main FAT, the backup is copied to the main to ensure stability Root directory Contains entries for every file and folder in the directory Connecting with Computer Science

Typical FAT file system Figure 10-5 Typical FAT file system Connecting with Computer Science

Defragmentation Occurs when files have clusters scattered in different locations on the storage medium rather than in a contiguous location Windows provides the Disk Defragmenter utility to reorganize clusters contiguously Improves performance by minimizing movement of the read/write heads Should be used regularly to ensure system runs at peak performance Connecting with Computer Science

Figure 10-6 Files become fragmented as they are stored in noncontiguous clusters; a defragmenting utility moves files to contiguous clusters and improves disk performance Connecting with Computer Science

Advantages of FAT Efficient use of disk space Does not have to use contiguous space for large files File names (FAT32) can have up to 255 characters Easy to undelete files that have been deleted When a file is deleted, the system places a hex value of E5h in the first position of the file name File remains on drive and can be undeleted by providing the original letter in the undelete process Connecting with Computer Science

Disadvantages of FAT Overall performance slows down as more files are stored on the partition Hard drive can quite easily become fragmented Lack of security NTFS provides access rights to files and directories File integrity problems Lost clusters Invalid files and directories Allocation errors Connecting with Computer Science

NTFS Overcomes limitations of the FAT system Is a “journaling” file system Keeps track of transaction performed and “rolls back” transactions if errors are found Uses a master file table (MFT) to store data about every file and directory on the volume Similar to a database table with records for each file and directory Uses clusters and reserves blocks of space to allow the MFT to grow Connecting with Computer Science

Advantages of NTFS File access is very fast and reliable With the MFT, the system can recover from problems without losing significant amounts of data Security is greatly increased over FAT File encryption with EFS (Encrypting File System) and file attributes File compression Process of reducing file size to save disk space Connecting with Computer Science

Disadvantages of NTFS Large overhead Not recommended for volumes less than 4 GB Cannot access NTFS volumes from MS-DOS, Windows 5, or Windows 98 Connecting with Computer Science

Comparing File Systems Choosing the correct file system is operating system dependent NTFS is recommended for Windows systems Today’s networked environments need security Today’s machines use tools that require large volumes If the hard drive is 10 GB or less, FAT is more efficient in handling smaller volumes of data UNIX/Linux have many file system choices Connecting with Computer Science

Connecting with Computer Science

Connecting with Computer Science

Connecting with Computer Science

Connecting with Computer Science

File Organization Binary or text Sequential or random access Binary files are computer readable but not human readable (i.e., executable programs, image files) Faster to access than text files Text files consist of ASCII or Unicode characters Easy to view and modify with application programs Sequential or random access Sequential data is accessed one chunk after the other in order Random access data can be accessed in any order Connecting with Computer Science

Sequential vs. random access Figure 10-7 Sequential vs. random access Connecting with Computer Science

Sequential Access Starts at the beginning of the file and processes to the end of the file Writing process is very fast because new data is added to the end of a file Inserting, deleting, or modifying data can be very slow Can store data in rows like a database record Rows can have field delimiters or specify fixed sizes for each field Connecting with Computer Science

A comma can be used as a row delimiter Figure 10-8 A comma can be used as a row delimiter Connecting with Computer Science

Data can also have a fixed size Figure 10-9 Data can also have a fixed size Connecting with Computer Science

Random Access Provides faster access to large amounts of data Stores fixed length records (relative records) Can mathematically calculate the position of the record on the disk surface Can update records in place May waste disk space if a record has partial or no data Works well when a sequential record number can easily identify records Connecting with Computer Science

Figure 10-10 Sequential records vary in size; relative records are all the same size Connecting with Computer Science

Hashing Used for accessing relative record files through the use of a unique value called the hash key Widely used in database management systems Involves the use of a hashing algorithm to generate hash keys for each of the records The hash key establishes an index to a row or record of information Connecting with Computer Science

Why Hash? Allows a key field number that is not suited for relative file access to be converted into a relative record number that can be used Example: using phone numbers as keys in a customer information table Divide the highest possible phone number by the expected number of customers to get the hash key 9999999999 / 2000 (estimated number of customers) = approximately 5,000,000 Phone number 7025551234 / 5,000,000 gives the record number 1045 Connecting with Computer Science

Why Hash? (continued) Hashing may result in collisions The same relative key is generated for more than one original key value One solution: expand the algorithm to add the sum of the digits of the phone number to the relative key The sum of the digits in phone number 7025551234 is 34 Original key 1045 + 34 gives 1079 Lessens collisions, but does not eliminate them Connecting with Computer Science

Dealing with Collisions Even the best hashing algorithm will have collisions One solution is to create an overflow area Records with duplicate record numbers are placed in the overflow area at the end of the file Record retrieval Hash key is calculated and record is retrieved If the record at that location is the desired one, then the overflow area is searched sequentially until matching record is found Connecting with Computer Science

An overflow area helps resolve collisions Figure 10-11 An overflow area helps resolve collisions Connecting with Computer Science

Hashing and Computer Science Having an efficient hashing algorithm is important to companies that produce database management systems Many different hashing algorithms are used in computer science Encryption and decryption Indexing Many programming languages have specialized libraries of built-in hashing routines Connecting with Computer Science

Summary A hard drive is an example of a random access device Stores information in tracks and sectors Accesses data through read/write heads File system: responsible for creating, manipulating, renaming, copying, and removing files from a storage device Windows uses either FAT or NTFS as the file system Connecting with Computer Science

Summary (continued) FAT keeps track of which files are using specific clusters Vulnerable to disk fragmentation NTFS uses a master file table (MFT) to keep track of the files and directories on a volume Used with Windows 2000, XP, and 2003 NTFS has many advantages over FAT Better reliability and security, journaling, file encryption, and file compression Connecting with Computer Science

Summary (continued) Linux can be used with many file systems XFS, JFS, ReiserFS, and ext3 A file contains data that is either binary or text (ASCII) Data is usually stored and accessed either sequentially or randomly (relative access) Connecting with Computer Science

Summary (continued) Hashing is a common method for accessing a relative file Involves a hashing algorithm to generate a hash key value used to identify a record location Collisions occur when the hash key is duplicated for more than one relative record location Goal of hashing To create an algorithm that allows a key field to be converted into a relative record number with a small number of collisions Connecting with Computer Science