

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 537 A. Arpaci-Dusseau Intro to Operating Systems Spring 2000
-^ What is a file and what operations can be performed on them? -^ What information (meta-data) must be associated with a file? -^ How are directories organized? -^ What is the difference between hard and soft links?
CS 537:Operating Systems file.fm.
-^ Named collection of bytes Type defined by creatorExample: Text, source, object, executables -^ Permanently and conveniently available
-^ Map bytes as collection of blocks on physical storage -^ Nonvolatile storage device Magnetic disksPersistent across reboots and power failures A.Arpaci-Dusseau CS 537:Operating Systems file.fm.
-^ How do users select files? -^ Convert “name” + offset --> logical disk block --> cylinder #, sec #
-^ All users are not equal
-^ Information must last safely for long periods of time
-^ Efficient use of disk space -^ Fast access to files CS 537:Operating Systems file.fm.
-^ Find space on disk -^ Give name to file
-^ Find current location in file (track per-file & per-process) -^ Seek within file to desired location
-^ Release disk space
-^ Set size to 0, but keep other attributes
A.Arpaci-Dusseau CS 537:Operating Systems file.fm.
-^ Name of file, type of file -^ Pointer to data on disk -^ File size -^ Most recent access and modification time -^ Owner and group id -^ Protection bits -^ Special file? Directory? Symbolic link?
122945 -rw-r----- 1 dusseau cs140 2918 Nov 1 18:53 midSol.ps
CS 537:Operating Systems file.fm.
-^ Search directories for file name and check permissions -^ Copy relevant meta-data to open file table in memory -^ Return index in open file table (“file descriptor”) -^ Application passes index to OS when accessing file
-^ Current position pointer -^ Index in system table
-^ File open count A.Arpaci-Dusseau CS 537:Operating Systems file.fm.
-^ How to map file name to location of file on disk? Index of meta-data in list
-^ Single directory for entire disk Each file must have a unique name -^ Special part of disk holds one directory Contains <file name, index> pairsFixed length name -^ Only appropriate for personal computers
-^ Directory for each user -^ Specify file with user and file name CS 537:Operating Systems file.fm.
-^ Data consists of <file name, index> pairs File name can be another directory -^ Special bit set in meta-data User programs can read directoriesOnly special system programs can write directories -^ Reference by separating names with slashes
-^ Root: Fixed index for meta-data (2) -^ . : This directory -^ .. : Parent directory
2: Find <“a”, 5>5: Find <“b”, 9>9: Verify no <“c”, X> previously; add “c” to directory