18.FileSystems-Fundamentals

18.FileSystems-Fundamentals - FileSystems: Fundamentals 1...

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

View Full Document Right Arrow Icon
1 File Systems: Fundamentals
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Files What is a file? A named collection of related information recorded on secondary storage (e.g., disks) File attributes Name, type, location, size, protection, creator, creation time, last- modified-time, … File operations Create, Open, Read, Write, Seek, Delete, … How does the OS allow users to use files? “Open” a file before use OS maintains an open file table per process, a file descriptor is an index into this file. Allow sharing by maintaining a system-wide open file table
Background image of page 2
3 Fundamental Ontology of File Systems Metadata The index node (inode) is the fundamental data structure The superblock also has important file system metadata, like block size Data The contents that users actually care about Files Contain data and have metadata like creation time, length, etc. Directories Map file names to inode numbers
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Basic data structures Disk An array of blocks, where a block is a fixed size data array File Sequence of blocks (fixed length data array) Directory Creates the namespace of files Heirarchical – traditional file names and GUI folders Flat – like the all songs list on an ipod Design issues: Representing files, finding file data, finding free blocks
Background image of page 4
5 Block vs. Sector The operating system may choose to use a larger block size than the sector size of the physical disk. Each block consists of consecutive sectors. Why? A larger block size increases the transfer efficiency (why?) It can be convenient to have block size match (a multiple of) the machine's page size (why?) Some systems allow transferring of many sectors between interrupts. Some systems interrupt after each sector operation (rare these days) “consecutive” sectors may mean “every other physical sector” to allow time for CPU to start the next transfer before the head moves over the desired sector
Background image of page 5

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

View Full DocumentRight Arrow Icon
File System Functionality and Implementation File system functionality: Pick the blocks that constitute a file. Must balance locality with expandability. Must manage free space. Provide file naming organization, such as a hierarchical name space. File system implementation: File header (descriptor, inode): owner id, size, last modified time, and location of all data blocks. OS should be able to find metadata block number N without a disk access (e.g., by using math or cached data structure). Data blocks. Directory data blocks (human readable names) File data blocks (data). Superblocks, group descriptors, other metadata…
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 03/09/2012.

Page1 / 31

18.FileSystems-Fundamentals - FileSystems: Fundamentals 1...

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

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