Department of Computer Engineering University of California at Santa Cruz. File Systems. Hai Tao

Similar documents
Mass Storage. 2. What are the difference between Primary storage and secondary storage devices? Primary Storage is Devices. Secondary Storage devices

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Distributed Video Systems Chapter 3 Storage Technologies

EECS 482 Introduction to Operating Systems

UNIT 4 Device Management

Disk Scheduling COMPSCI 386

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

19 File Structure, Disk Scheduling

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

Operating Systems. Operating Systems Professor Sina Meraji U of T

Disc Allocation and Disc Arm Scheduling?

CS420: Operating Systems. Mass Storage Structure

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Chapter 20: Multimedia Systems

Chapter 20: Multimedia Systems. Operating System Concepts 8 th Edition,

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Today: Secondary Storage! Typical Disk Parameters!

Chapter 10: Mass-Storage Systems

Chapter 6A. Describing Storage Devices. Describing Storage Devices. Types of Storage Devices. Store data when computer is off Two processes

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CS 537 Fall 2017 Review Session

File system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke

Part IV I/O System. Chapter 12: Mass Storage Structure

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo

EECS 482 Introduction to Operating Systems

22 File Structure, Disk Scheduling

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1

Chapter 11 I/O Management and Disk Scheduling

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

CSE 451: Operating Systems Winter Secondary Storage. Steve Gribble. Secondary storage

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

File Systems. File system interface (logical view) File system implementation (physical view)

Operating Systems 2010/2011

Mass-Storage Structure

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

Multimedia Storage Servers

Chapter 4 File Systems. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

1. What is the difference between primary storage and secondary storage?

Chapter 14: Mass-Storage Systems. Disk Structure

Module 13: Secondary-Storage

Data Storage and Query Answering. Data Storage and Disk Structure (2)

CSE 451: Operating Systems Winter Lecture 12 Secondary Storage. Steve Gribble 323B Sieg Hall.

Storage. CS 3410 Computer System Organization & Programming

Free Space Management

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

Chapter 14: Mass-Storage Systems

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

Chapter 12: Mass-Storage

Disks and RAID. CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, E. Sirer, R. Van Renesse]

Multimedia Systems 2011/2012

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

Operating Systems Peter Pietzuch

CPSC 421 Database Management Systems. Lecture 11: Storage and File Organization

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CSE 451: Operating Systems Spring Module 12 Secondary Storage. Steve Gribble

BBM371- Data Management. Lecture 2: Storage Devices

Hard Disk Drives (HDDs) Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Outlook. File-System Interface Allocation-Methods Free Space Management

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS)

Main Points. File systems. Storage hardware characteristics. File system usage patterns. Useful abstractions on top of physical devices

COMP 3361: Operating Systems 1 Final Exam Winter 2009

Hard Disk Drives (HDDs)

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

File System Implementation. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Fall COMP3511 Review

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010

Mass-Storage Structure

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

Disks: Structure and Scheduling

Introduction. Secondary Storage. File concept. File attributes

Hard Disk Drives. Nima Honarmand (Based on slides by Prof. Andrea Arpaci-Dusseau)

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane

CSE506: Operating Systems CSE 506: Operating Systems

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices

A track on a magnetic disk is a concentric rings where data is stored.

secondary storage: Secondary Stg Any modern computer system will incorporate (at least) two levels of storage:

CSE 120: Principles of Operating Systems. Lecture 10. File Systems. November 6, Prof. Joe Pasquale

1993 Paper 3 Question 6

1.1 Bits and Bit Patterns. Boolean Operations. Figure 2.1 CPU and main memory connected via a bus. CS11102 Introduction to Computer Science

Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management

CSE 451: Operating Systems Spring Module 12 Secondary Storage

Tape pictures. CSE 30341: Operating Systems Principles

Silberschatz, et al. Topics based on Chapter 13

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Overview of Mass Storage Structure

Operating Systems. V. Input / Output. Eurecom

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

File System Implementation

Discussion Week 10. TA: Kyle Dewey. Tuesday, November 29, 11

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD

I/O and file systems. Dealing with device heterogeneity

Introduction to OS. File Management. MOS Ch. 4. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Transcription:

File Systems Hai Tao

File System File system is used to store sources, objects, libraries and executables, numeric data, text, video, audio, etc. The file system provide access and control function for the storage and retrieval of files Organization of the file system Disk Scheduling

File Structure Storage: Contiguous (sequential) versus non-contiguous (non-sequential) Access: Sequential versus Random

File Structure - UNIX Store block information in mapping tables Each file is associated with a small table called i-node For large files, multi-level in-direct maps are used

File Structure File Allocation Table (FAT) Department of Computer Engineering A link structure Each file is represented as linked blocks Blocks are linked using pointers One problem is random access because to access a part of a file, the system always has to start from the beginning of a file

Disk Management Block cache recently accessed blocks are stored in memory for future use. The underlying assumption is that the probability of revisit is high The physical structure of the disk has to be considered for efficient access. For example, the i-node or FAT is stored at the middle of a disk. This make the access time 50% less

Disk Scheduling The actual time to read or write a disk block is determined by The seek time the time required for the movement of the read/write head) The latency time or rotation delay the time during which the transfer cannot proceed until the right block or sector rotates under the read/write head The actual data transfer time for copying data from disk to the main memory Reducing seek time is the key. For CD, the seek time is very long

Disk scheduling Department of Computer Engineering Fist-Come-First-Served (FCFS) - Easy and fair, but long average seek time

Disk scheduling Department of Computer Engineering Shortest-Seek-Time (SSTF) Access the data the can be most easily accessed (shortest seek time). Low seek time, but not fair.

Disk scheduling Department of Computer Engineering SCAN Similar to SSTF, but take current disk movement into account. It serve all request at one direction, then the another direction

Disk scheduling Department of Computer Engineering C-SCAN Similar to SCAN, but less unfair. It serve all request at only one direction.

Multimedia File Systems Special characteristics Real-time performance - Data must be retrieved before the deadline. Buffering is used to remove jitter Large file size Multiple data streams - Multiple streams should be organized in a way so that they can be access before the deadlines There two issues in achieving these goals - Organize data on disk so that they can be retrieved efficiently - Using special disk scheduling and buffering to achieve realtime play data access

Storage Device Magnetic disks Fast Seek-time around 8-10 ms, sustained transfer rate around 15MB/s Affordable $1-$2/GB Portability is relative poor Moving parts Can be very small 1GB on a quarter-size hard drive (IBM) Flash memory (PenDrive) Seek-time less than 1 ms (0.25 ms) Sustained transfer rate 1.5 MB/s Expensive No moving part

Storage Device Department of Computer Engineering Optical disks Slow - 2X speed 320 millisecond seek time 300K per second transfer rate - 4X speed 135-180 millisecond seek time 600K per second transfer rate - 8X speed 135-180 millisecond seek time 1.2 MBps transfer rate - 12X speed 100-150 millisecond seek time 1.8 MBps transfer rate - 16X speed 100-150 millisecond seek time 2.4 MBps (maximum) transfer rate - 24X speed 100-150 millisecond seek time 3.6 Mbps (maximum) transfer rate - 32X speed 100-150 millisecond seek time 4.8 Mbps (maximum) transfer rate Portable Inexpensive

Storage Device DVD Rom Seek time around 100 ms Sustained transfer rate (read) 16 MB/s Capacity Large 4.7 GB Media Expensive Zip Drive Seek time 29 ms Sustained transfer rate 2.4M/s Capacity 100-250 MB

Storage Device Methods of recording are different Optical - constant linear speed, so varying rotation speed. Bits are evenly distributed on the disk Magnetic disk constant rotation speed. Bits are more dense on the inner cylinders Flash memory no moving parts

Placement of data on storage device Department of Computer Engineering Fragmentation Internal fragmentation a block is not entirely filled by data. Only happens at the last block. The larger the block, the more waste may occur (why?) External fragmentation there are small number of blocks between files that are not used (in a contiguous system) In a conventional file system, the goal of file organization is to minimize disk fragmentation, therefore increase the capacity and In a multimedia file system, the goal is to provide a constant and time access of data Store contiguous media in large data blocks contiguously. Files that are likely to be retrieved together are stored together to reduce access time

Disk scheduling algorithm In traditional file system, the goal of disk scheduling is to reduce average seek time to achieve high throughput when multiple files are accessed In a multimedia system, the goal is to meet the deadlines of time-critical tasks In a contiguous file system, scheduling algorithm is needed only when multiple streams are accessed concurrently

Earliest Deadline First (EDF) The block of the stream with the earliest deadline is accessed first EDF is preemptive but may impose unnecessary additional cost in excessive context switching Results in poor throughput and excessive seek time

Earliest Deadline First (EDF) Department of Computer Engineering Example

SCAN-EDF The request with the earliest deadline is always served first For requests with the same deadline, the first one according to the scan direction is served first Efficiency depends on how often requests have the same deadlines. To make this occur more often, use multiple of cycle as deadline (This is usually allowed in playback of media files) Another strategy is to sum up all the access time of tasks in a cycle and use the total time as the deadline for all tasks

SCAN-EDF Department of Computer Engineering Example

Group Sweeping Scheduling (GSS) Serve in cycles in round-robin manner N streams are divided into g groups Groups are served in fixed order In each group, streams are accessed according to SCAN strategy Why Suppose use simple SCAN scheme, for the audio stream, the block can be read first in one cycle but the last in another cycle. Using groups reduces the jitter

Group Sweeping Scheduling (GSS) Department of Computer Engineering Example