Shared Files

Description

Shared files is one of the file systems implementation concepts
Ahmad Abdelwahed
Note by Ahmad Abdelwahed, updated more than 1 year ago
Ahmad Abdelwahed
Created by Ahmad Abdelwahed almost 9 years ago
14
0

Resource summary

Page 1

The Connection between directories and the shared file is called link.The file system is called Directed Acyclic Graph (DAG).One of the problems from sharing files among directories is maintain the disk address, since the copy of the file will have the same disk address at the beginning but if any directory appended the file its new block will be listed in the directory doing the change. It won't be visible to the other directory.First Solution: The disk block is listed a little data structure associated with the file, and each directory will point to it. The issue with this, the file has one owner if it removes the file, the other directory will point invalid i-node, if the i-node later reassigned to another file then it will point to wrong file.The only thing to do is to remove owner's directory entry, but leave the i-node intact with count set to 1. But the owner will still bill for the file if any accounting or quotas is done.Second Solution: To share a file, the second directory make symbolic link, in which is a new file contains just the path name of the file to which it is linked. When the directory reads from the linked file, the operating system sees that the file being read from LINK, looks up the name of the file, and reads that file. If the owner deleted the file the link will fail since it path name not i-node pointer.Its issue is the overhead to read, parse the path.

Show full summary Hide full summary

Similar

File System Consistency
Ahmad Abdelwahed
Components of An Operating System - Jason Madappattu
Jason EM
Why we need files
Ahmad Abdelwahed
File Naming
Ahmad Abdelwahed
File attributes
Ahmad Abdelwahed
OS1: Operating system basics
MpoMp
OS11: Interprocess communication
MpoMp
OS9: Processes
MpoMp
Operating Systems
bubblesthelabrad
OS10: Threads
MpoMp
OS Final
Hello World