Class Note for CMPSCI 377 at UMass(41)
Class Note for CMPSCI 377 at UMass(41)
Popular in Course
Popular in Department
This 5 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at University of Massachusetts taught by a professor in Fall. Since its upload, it has received 12 views.
Reviews for Class Note for CMPSCI 377 at UMass(41)
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 02/06/15
CMPSCI 377 Operating Systems Lecture 16 November 15 Lecturer Emery Berger Fall 2005 Scribe Dennis Gave Rob Silva Today File Systems 0 Who are they 0 What are they 0 Where do they come from 161 File Systems and IO 1611 Overview Files another OS provided abstraction over hardware resources 0 applications operate on les in a le system 7 deviceindependent interface 7 open close link read write rename 0 device level interface 7 manage disk in terms of sectors 7 OS converts calls to hardware calls USER EXPECTATIONS ON DATA Persistence data lives over crashes etci Speed quick data access 0 Size lots of data Sharing Protection share and restrict access Ease of use nd examine and modify data 161 162 Lecture 16 November 15 HARDWARE OS support for data Hardware 0 Persistence disks nonvolatile memory 0 Speed random access devices 0 Size disk capacity grows fast OS 0 Persistence redundancy fault tolerance 0 Share Protect UNIX privileges 0 Ease of use names associated With data les hierarchical directories transparent mapping of devices FILES Files are a named collection of related information recorded on secondary storage This can include source code binary code relational databases etc They can be structured or unstructured structured example IBM mainframe OSeseries of records unstructured example UNIX lekstream of bytes Files have attributes name type location size protection creation time modi ed accessed etc 1612 User Interface to File System Data Operations 0 Open le table shared by all 7 open count le attributes location of le on disk pointers to locations of les in memory 0 Per process le table one for each process 7 pointers to entry in open le table current position in le offset mode in Which process accesses le r W rW pointers to le buffers FILE OPERATIONS creating a le createname o allocate disk space check disk quotas permission etc 0 create le descriptor for le name location on disk attributes adds le descriptor to directory that contains le may mark le With type attribute especially Mac 0 advantages error detection launch appropriate application Lecture 16 November 15 o disadvantages not supported everywhere7 complicated FILE OPERATIONS deleting a le unlink leDescription 0 nd directory containing le 0 free disk blocks used by le 0 remove le descriptor from directory leDescriptor is a pointer to some object le name7 location7 attribute FILE OPERATIONS open les openname7 mode 0 check if le open by another process 0 if not nd le7 copy le into systemWide open le table FILE OPERATIONS close les closefd 0 remove entry for le in processls le table 0 decrement open count in systemWide le table FILE OPERATIONS others reading les random access vs sequential access Writing to les point to Where you want to Write7 copy from buffers to le seek memory mapping les 163 164 1613 File Access Methods common le access patterns from programmer7s perspective 0 sequential data processed in order 7 most programs use this method 7 EX compiler reading source le 0 keyed 7 address block based on key table 1614 Naming of Directories need method of retrieving les from disk OS uses numbers7 but we like names 0 Flat File Systems 7 one level directory 96 one namespace for entire disk7 every name unique 96 directory contains name7 index pairs 7 two level directory 96 separate directory for each user 0 Hierarchical File Systems 7 treestructured name space 7 d 7 7 7 7 7 7 7 7 WWW user group other used by all modern OS directory becomes special le on disk Referential Naming Hard Links UNIX ln command 7 allow mult links to single le example ln A B77 init A 7gt file lOO after A7 B 7gt file lOO Soft Links UNIX ln s command 7 symbolic pointer from one le to another example ln s A B77 init A 7gt file lOO after A 7gt file lOO7 B 7gt A Lecture 16 November 15 Lecture 16 November 15 Protection 0 OS must allow users to control access to les 0 grant deny access to le operations depending on protection info access lists groups Windows 0 for each le with a user name and access type access control bits UNIX o 3 categories of users owner7 group7 world 165
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'