Slides for Restart File Systems - Operating Systems | COMP 310, Study notes of Operating Systems

Material Type: Notes; Class: Operating Systems; Subject: Computer Science; University: University of San Diego; Term: Fall 2004;

Typology: Study notes

Pre 2010

Uploaded on 08/16/2009

koofers-user-la8
koofers-user-la8 🇺🇸

9 documents

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
COMP 310:
Operating Systems
Lecture 23:
Restart File Systems
October 25, 2004
Christine Alvarado
Today’s goals
Understand basics of file management
Review properties of physical disks
The file system abstraction
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Slides for Restart File Systems - Operating Systems | COMP 310 and more Study notes Operating Systems in PDF only on Docsity!

COMP 310:

Operating Systems

Lecture 23:

Restart File Systems

October 25, 2004

Christine Alvarado

Today’s goals

 Understand basics of file management

 Review properties of physical disks

 The file system abstraction

Midterm Results  Scores:

 Answers posted online Hours Spent on Projects 0 5 10 15 20 25 30 35 40 45 Proj 1 Proj 2

Disk Structure Disk Interaction Is Complicated  Specifying a disk request requires a lot of detailed information

 If you want to specify a place on a disk, what do

you have to know?

 Modern disks are even worse…

Disk Performance

 Disk request performance depends on many steps:

 Goal of OS: Minimize time to perform these steps

 How? Disk Scheduling  Seeks are expensive! (i.e., milliseconds—how long was memory access?)  How might we schedule disk seeks?

File Systems  The file system is the ABSTRACTION the OS provides for the data on the disk  File systems:

 Organize files logically

 Permit sharing of data between processes,

people and machines

 Protect data from unwanted access

 Just like VM did for PM!

Files  A file is data with some properties  A file can also have a type

 Understood by file system

 Understood by other parts of the OS

 Executable, dll, source, text, etc…

 Where is file’s type encoded?

 Windows?

 UNIX?

size Data

Basic File Operations File Access Methods  Some file systems provide different access methods to files:

What method does Unix, NT provide?

Tree-Structured directories

root code bin classes

nachos java find reorder COMP

PSs

PS1 PS

threads userprog

synch.h sych.cc subdir

subdir

Acyclic Graph Structure

root code bin classes

nachos java find reorder COMP

code PSs

PS1 PS

threads userprog

synch.h sych.cc subdir

subdir

How are shared files implemented? Problems/Issues with Graph Structure

Protection  File systems implement some kind of protection system

 Who can access

 How can they access

 A protection system dictates whether an action (read/write/execute) performed by a process/thread/user on a file should be allowed

 Where have you seen this recently?

Representing Protection Dr. Alvarado rx rx r OSStudent2 rwx rwx rw OSStudent1 rwx rwx rw /code /threads /synch.cc

ACLs  FS must maintain a list of who has access to what

 What happens when files are heavily shared?

 How does UNIX solve this problem?

File System Layout

 How do file systems use the disk to store files?

 File systems define a block size (e.g. 4KB)  Disk space allocated in terms of blocks  A “Master Block” determines location of root directory  A “Free Map” keeps track of which blocks are free or allocated  Usually a bitmap (How?)  Stored on disk—can be cached in memory  Remaining disk blocks used to store files.

Unix Inodes and Path Search

 Unix Inodes are NOT directories

 Inodes describe where on disk the blocks for a file

are placed

 Directories are files, so inodes also describe where they are placed

 Directory entries map file names to inodes

 To open /one user Master Block to find inode for /  Open /, look for entry for one  Read the inode for one into memory  The inode says where first data block is on disk  Read that block into memory to read file… Read Ahead  Many File Systems implement “read ahead”

 FS predicts that process will keep reading in file

 FS requests next block before it is accessed

 When is this an advantage?

Summary of File Systems  Files

 Operations, access methods

 Directories

 Operations using directories to do path searches

 Sharing  Protection  File System Layouts