



































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
These are the Lecture Slides of Operating Systems which includes File-System Structure, Defining, Logical File, Physical Device, Secondary, System Organized, File Control Block, Structure Consisting, Typical File Control Block etc.Key important points are: File Systems, Interface, Access Methods, Directory Structure, Protection, Allocation, Free Space Management, Directory Implementation, Structured, Meaning
Typology: Slides
1 / 43
This page cannot be seen from the preview
Don't miss anything!




































10: File Systems 1
10: File Systems 2
10: File Systems 4
FILE SYSTEMS INTERFACE
A file can have various kinds of structure
None - sequence of words, bytes
File
Concept
10: File Systems 5
FILE SYSTEMS INTERFACE
Attributes of a File
Name – only information kept in human-readable form
and usage monitoring
maintained on the disk.
File
Concept
10: File Systems 7
FILE SYSTEMS INTERFACE
Note: The command “LDE” – Linux Disk Editor – does amazing things but requires root privilege.
-rw-rw-rw- 1 jbreecherusers 56243 Mon Dec 18 14:25:40 2006
TYPE: regular file LINKS: 1 DIRECT BLOCKS= 0x002462CA MODE: \0666 FLAGS: \10 0x002462CB UID: 01170(jbreecher)ID: 00100(users) 0x002462CC SIZE: 56243 SIZE(BLKS): 128 0x002462CD 0x002462CE ACCESS TIME: Mon Dec 18 14:35:35 2006 0x002462CF CREATION TIME: Mon Dec 18 14:25:40 2006 0x002462D MODIFICATION TIME: Mon Dec 18 14:25:40 2006 0x002462D DELETION TIME: Wed Dec 31 19:00:00 1969 0x002462D 0x002462D 0x002462D 0x002462D INDIRECT BLOCK= 0x002462D 2x INDIRECT BLOCK= 3x INDIRECT BLOCK=
File
Concept
Expanded on next page
10: File Systems 8
FILE SYSTEMS INTERFACE
lde v2.6.1 : ext2 : /dev/mapper/VolGroup00-LogVol Inode: 1170636 (0x0011DCCC) Block: 2384586 ( 0x002462CA ) 0123456789!@$%^ 462CA000 74 68 69 73 20 6D 61 6E : 79 20 6E 6F 74 20 77 6F this many not wo 462CA010 72 6B 20 74 68 69 73 20 : 6D 61 6E 79 20 6E 6F 74 rk this many not 462CA020 20 77 6F 72 6B 20 74 68 : 69 73 20 6D 61 6E 79 20 work this many 462CA030 6E 6F 74 20 77 6F 72 6B : 20 74 68 69 73 20 6D 61 not work this ma 462CA040 6E 79 20 6E 6F 74 20 77 : 6F 72 6B 20 74 68 69 73 ny not work this 462CA050 20 6D 61 6E 79 20 6E 6F : 74 20 77 6F 72 6B 0A 74 many not work.t 462CA060 68 69 73 20 6D 61 6E 79 : 20 6E 6F 74 20 77 6F 72 his many not wor
File
Concept
lde v2.6.1 : ext2 : /dev/mapper/VolGroup00-LogVol Inode: 1170636 (0x0011DCCC) Block: 2384598 ( 0x002462D6 ) 0123456789!@$%^ 462D6000 D7 62 24 00 D8 62 24 00 : 00 00 00 00 00 00 00 00 .b$..b$......... 462D6010 00 00 00 00 00 00 00 00 : 00 00 00 00 00 00 00 00 ................ 462D6020 00 00 00 00 00 00 00 00 : 00 00 00 00 00 00 00 00 ................
10: File Systems 10
FILE SYSTEMS INTERFACE
Access
Methods
10: File Systems 11
FILE SYSTEMS INTERFACE Access Methods
10: File Systems 13
Example 1: Index contains the name appearing as the first record in each block. There are as many index entries as there are blocks.
Example 2: Index contains the block number where "A" begins, where "B" begins, etc. Here there are only 26 index entries.
FILE SYSTEMS INTERFACE
Access
Methods
Smith
Smith, John | data
Adams Arthur Asher
Saarnin
Smith, John | data
Adams Baker Charles
Adams | Data Arthur | Data Asher | Data Baker | Data
Saarnin | data
10: File Systems 14
Directories maintain information about files:
For a large number of files, may want a directory structure - directories under directories.
Information maintained in a directory:
Name The user visible name. Type The file is a directory, a program image, a user file, a link, etc. Location Device and location on the device where the file header is located. Size Number of bytes/words/blocks in the file. Position Current next-read/next-write pointers. Protection Access control on read/write/ execute/delete. Usage Open count Usage time of creation/access, etc. Mounting a filesystem occurs when the root of one filesystem is "grafted" into the existing tree of another filesystem.
There is a need to PROTECT files and directories.
Actions that might be protected include: read, write, execute, append, delete, list
FILE SYSTEMS INTERFACE Directory Structure
10: File Systems 16
FILE SYSTEMS INTERFACE Directory Structure
10: File Systems 17
Attaching portions of the file system into a directory structure.
FILE SYSTEMS INTERFACE Other Issues
10: File Systems 19
FILE SYSTEMS INTERFACE Protection
Example on
Windows XP
10: File Systems 20
When talking about “the file system”, you are making a statement about both the rules used for file access, and about the algorithms used to implement those rules. Here’s a breakdown of those algorithmic pieces. Application Programs The code that's making a file request.
Logical File System This is the highest level in the OS; it does protection, and security. Uses the directory structure to do name resolution.
File-organization Module Here we read the file control block maintained in the directory so we know about files and the logical blocks where information about that file is located.
Basic File System Knowing specific blocks to access, we can now make generic requests to the appropriate device driver.
IO Control These are device drivers and interrupt handlers. They cause the device to transfer information between that device and CPU memory.
Devices The disks / tapes / etc.