



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!




y V lVolumes y Directories (link file names to file โstructureโ) y The list of blocks containing the data y Other information such as access control list or permissions, owner, time of access, etc?
2
User Process
File System Cache (โbufferโ) Inode cache Copy of superblock
User Process
File System Module (k l)
User mode
3
Disk requestsI/O Driver
(kernel)^ superblock
Physical Storage Layer
4
5
6
y Linux systems call these iโnode structures
7
8
y Disk is divided into 1 or more partitions y Sector 0 of disk called Master Boot Record y End of MBR has ppartition table (start & end address of ppartitions)
y Loaded by MBR and executed on boot
9
10
y Simple: state required per file is start block and size y Performance: entire file can be read with one seek
y Fragmentation: external is bigger problem y Usability: user needs to know size of file
11
y First word of each block points to next block y Rest of disk block is file data
12
y Directory has information about the fileโs disk blocks y Whole file (contiguous), first block (linkedโlist) or Iโnode y Directory also has attributes of each file
19
y Limit file name length, say 255 chars, and use previous scheme y Pros: Simplep^ Cons: wastes spacep y Directory entry comprises fixed and variable portion y Fixed part starts with entry size, followed by attributes y Variable part has the file name y Pros: saves space y Cons: holes on removal, page fault on file read, word boundaries y Directory entries are fixed in length, pointer to file name in heap y Pros: easy removal, no space wasted for word boundaries y Cons: manage heap, page faults on file names
20
21
y Use a perโdirectory hash table y Could use hash of file name to store entryy for file y Pros: faster lookup y Cons: More complex management y Caching: cache the most recent searches y Look in cache before searching FS
22
y One Solution: copy disk addresses in Bโs directory entry y Problem: modification by one not reflected in other userโs view
23
y Use iโnodes to store file information in directories y Cons: What happens if owner deletes file?
y Symbolic links: B links to Cโs file by creating a file in its directory y The new Link file contains path name of file being linked y Cons: read overhead
24
y If 131,072 bytes/track, rotation time 8.33 ms, seek time 10 ms y ToTo readread kk bytesbytes block:block: 10+10+ 4.1654.165 ++ (k/131072)(k/131072) 8.33*8.33 msms y Median file size: 2 KB
Block size^25
y Linked list and bitmap approach
26
y Only one block need to be kept in memory y Bad scenario: Solution (c)
y Lesser storage in most cases y Allocated disk blocks are closer to each other
27
28
29
y Put them in order y Seek to the outside rim of the disk y Then pick up blocks in โinwardโ orderโฆ.
30