ch10 - Chapter 10: File-System Interface Chapter Adapted to...

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

View Full Document Right Arrow Icon
Chapter 10: File-System Interface Chapter 10: File-System Interface Adapted to COP4610 by Robert van Engelen
Background image of page 1

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

View Full DocumentRight Arrow Icon
10.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File Concept File Concept A file is a named collection of related information recorded on secondary storage Secondary storage is usually nonvolatile Files have contiguous logical address spaces File types: Data Numeric Text Binary Program Source Binary object file
Background image of page 2
10.3 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File Structure File Structure None - just a sequence of words, bytes Simple record structure Lines of fixed length or variable length Complex structures for specific use Formatted document Relocatable load file Can simulate last two with first method by inserting appropriate control characters and layout requirements Who decides: Operating system Program (application developer)
Background image of page 3

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

View Full DocumentRight Arrow Icon
10.4 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File Attributes File Attributes Name – only information kept in human-readable form Identifier – unique tag (number) identifies file within file system Type – needed for systems that support different types Location – pointer to file location on device Size – current file size Protection – controls who can do reading, writing, executing Time, date, and user identification – data for protection, security, and usage monitoring Information about files are kept in the directory structure, which is maintained on the disk
Background image of page 4
10.5 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 File Operations File Operations File is an abstract data type with operations Create Write Read Reposition within file Delete Truncate Open ( F i ) – search the directory structure on disk for entry F i , and move the content of entry to memory Close ( F i ) – move the content of entry F i in memory to directory structure on disk
Background image of page 5

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

View Full DocumentRight Arrow Icon
10.6 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Open Files Open Files Several pieces of data are needed to manage open files: File pointer : pointer to last read/write location, per process that has the file open File-open count : counter of number of times a file is open – to allow removal of data from open-file table when last processes closes it Disk location of the file : cache of data access information Access rights : per-process access mode information
Background image of page 6
10.7 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Open File Locking Open File Locking Provided by some operating systems and file systems Mediates access to a file Mandatory or advisory locking: Mandatory – access is denied depending on locks held and requested Advisory – processes can find status of locks and decide what to do
Background image of page 7

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

View Full DocumentRight Arrow Icon
10.8
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/11/2011 for the course COP 4610 taught by Professor Robertengelen during the Spring '11 term at FSU.

Page1 / 39

ch10 - Chapter 10: File-System Interface Chapter Adapted to...

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

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