A18_FileSystems - File Systems Review of File Systems and...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
File Systems Review of File Systems and Disk Management
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
File System Functions Disk Management : allocate disk blocks to files Naming (device independence): how to map user file names into physical addresses Protection : security and sharing of files, as needed Reliability : protection against crashes disk crash loses permanent info on disk; system crash can lose info in kernel buffers that hasn't been written to disk yet. Performance/Efficiency : try to reduce amount of time spent in I/O
Background image of page 2
Files and (Magnetic) Disks The disk is composed of sectors, tracks, surfaces, cylinders – this is the physical view of secondary storage The OS maintains a file system to hide messy disk details from applications. The file system provides an abstract view of the disk as a collection of logical blocks instead of sectors.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
from Operating Sytems , by William Stallings, Prentice Hall
Background image of page 4
Files and Disks A sector is the physical unit of data transfer between memory and disk; a block is the logical unit of data transfer , as managed by the file system. A block is a sector multiple. (UNIX block size = 4-8KB, usually) The user views a file as a sequential stream of bytes (in UNIX and similar systems) or as a collection of fields/records (in database systems). When the user program reads or writes data the file system will fetch/write the block that contains those bytes.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Files and Disks Standard sector size has been 512 bytes, although some disks had larger sectors. 4K byte sectors became a standard in 2011. Traditionally, every sector has had the same # of bits, even though the physical sector side gets larger as you move from center to edge. Zoned recording divides disk into groups of adjacent tracks and stores more data in large zones than in small ones.
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Common Access Methods Sequential access : get_next Most file systems support this. For example, a C++ program will always maintain a pointer to the next byte to be read (or written) in an open file Random or direct access : seek to a particular location in the file – may be identified by record number or some field value.
Background image of page 8
Performance Efficiency Caching and buffering Minimize storage fragmentation – small, unusable blocks of free disk space Minimize file fragmentation , splitting a file into multiple blocks so that a seek may occur between any two blocks Objective: optimize locality – store related information close together
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The disk cache is a set of blocks (buffers) that are set aside in kernel space. Copies of recently accessed file blocks are kept here to reduce the number of disk accesses Same concept as cache memory, which reduces the number of main memory references. Blocks in the disk cache may be file data, or file
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/14/2011 for the course CS 690 taught by Professor Staff during the Fall '11 term at University of Alabama - Huntsville.

Page1 / 49

A18_FileSystems - File Systems Review of File Systems and...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online