filesystems

filesystems - Computer Science 322 Operating Systems Mount...

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

View Full Document Right Arrow Icon
Computer Science 322 Operating Systems Mount Holyoke College Spring 2008 Topic Notes: File Systems Disks and Disk Structures We will consider disks and file structures in much more detail than most of the other types of I/O devices. Data is written to the surface of the disk. How can it be arranged? CD/DVD is arranged in a “spiral” for a continuous stream. We’ll concentrate on magnetic disks (floppy disk, hard disk). A hard disk may have multiple surfaces, or platters. For simplicity, assume there is only one disk, or platter, involved. A read/write head is needed for each platter. The data on a disk is arranged in concentric rings called cylinders or tracks . Each cylinder of the disk is divided into chunks called sectors that contain blocks , the minimum allocatable and addressable unit on the disk. Since there is more space on the outside of the disk, there may be more blocks in outer cylinders than there are on inner cylinders. The particular configuration of cylinders, sectors and the number of platters is the drive geometry . The actual drive geometry may be difficult to determine, as modern disk drives lie, controllers lie, and by the time you get the numbers they may be completely meaningless. So to read or write data on the disk, a cylinder and sector must be specified. The read/write head must be positioned over the desired cylinder and sector. The read/write heads are typically connected to the end of a moveable arm. This arm is moved to position the head at the correct cylinder. When the disk rotates and the desired sector reaches the read-write head, the read or write operation can proceed. The speed of this operation depends on two major factors: seek time – the time it takes to move the read/write head to the correct cylinder rotational latency – the time it takes for the correct sector to rotate under the read/write head We can minimize seek time by minimizing the distance the read/write head has to move in order to service the incoming requests. File System Interface
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 322 Operating Systems Spring 2008 We switch focus now to talk about how to organize information on disks. Hopefully everyone has a good idea what we mean by a file . files can be data or programs can be simple or complex (plain text, or a specially-formatted file) structure of a file is determined by both the OS and the program that creates it files are stored in a file system , which may exist on a disk on a tape in main memory Files have a number of attributes: filename file type (maybe) location – where is it on the device size protection/permissions (maybe) timestamp, ownership directory information A number of operations can be performed on files, many of which we have been doing without giving it miuch thought: create write/append read seek (reposition within file) delete truncate open, close 2
Background image of page 2
CS 322 Operating Systems Spring 2008 File Types How does a “type” get assigned to a file? can use file extension (.c, .exe, .doc, .tex, .mp3, etc.)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 20

filesystems - Computer Science 322 Operating Systems Mount...

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

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