Question

In: Computer Science

Consider a file system using a multi-level indexing scheme in inodes as the file organization. In...

Consider a file system using a multi-level indexing scheme in inodes as the file organization. In this question, you are going to compare symbolic linking with hard linking.

i. (3%) Consider creating a symbolic link abc.txt in the current directory /usr/local/ that links to the file /home/c3230a/intro.txt. Which filesystem data structures need to be involved and/or updated?

ii. (3%) Consider creating a hard link abc.txt in the current directory /usr/local/ that links to the file /home/c3230a/intro.txt. Which filesystem data structures need to be involved and/or updated?

Solutions

Expert Solution

1. Hard Links

  • Each hard linked file is assigned the same Inode value as the original, therefore they reference the same physical file location. Hard links more flexible and remain linked even if the original or linked files are moved throughout the file system, although hard links are unable to cross different file systems.
  • ls -l command shows all the links with the link column shows number of links.
  • Links have actual file contents
  • Removing any link, just reduces the link count, but doesn’t affect other links.
  • We cannot create a hard link for a directory to avoid recursive loops.
  • If original file is removed then the link will still show the content of the file.
  • Command to create a hard link is:
    $ ln  [original filename] [link name] 
    

2. Soft Links

  • A soft link is similar to the file shortcut feature which is used in Windows Operating systems. Each soft linked file contains a separate Inode value that points to the original file. As similar to hard links, any changes to the data in either file is reflected in the other. Soft links can be linked across different file systems, although if the original file is deleted or moved, the soft linked file will not work correctly (called hanging link).
  • ls -l command shows all links with first column value l? and the link points to original file.
  • Soft Link contains the path for original file and not the contents.
  • Removing soft link doesn’t affect anything but removing original file, the link becomes “dangling” link which points to nonexistent file.
  • A soft link can link to a directory.
  • Link across filesystems: If you want to link files across the filesystems, you can only use symlinks/soft links.
  • Command to create a Soft link is:
    $ ln  -s [original filename] [link name] 

Related Solutions

Using the multi-level list feature of your work processor, suggest a useful organization of 6-10 subdirectories...
Using the multi-level list feature of your work processor, suggest a useful organization of 6-10 subdirectories for your Documents folder. The hierarchy should be at least 2 levels deep. Write and test a PowerShell Script that uses the PowerShell command New-Item (as opposed to using the mkdir command) to create this hierarchy in the current directory, whatever it happens to be. (Hint: for the -Path switch specify a relative, not absolute path)
LEVEL ONE Lists and indexing Create a list x that spans 1 to 100 using 5...
LEVEL ONE Lists and indexing Create a list x that spans 1 to 100 using 5 unit increments.                                 Hint: Use the inline for and range(). Create a list y containing the elements from x that are divisible by 2.                                 Hint: Explore the for … if … statement. Do b. in another manner. Hint: Use , e.g., array() and where() from numpy. LEVEL TWO Arrays in numpy Create an array x that contains a random set of 100 uniform(0,10)...
Your friend is currently engaged in a multi-level marketing pyramid scheme, where he/she has opened up...
Your friend is currently engaged in a multi-level marketing pyramid scheme, where he/she has opened up a storefront selling Cutco knives, essential oils, and Herbalife products. Suppose that your friend borrowed $75,000 from a bank at a fixed interest rate of 5.25% in order to fund business operations. a) Assume that after your friend takes out the loans, inflation significantly rises as he/she starts paying back the loans. Does the rise in inflation benefit or harm your friend? Why? b)...
(Operating System CSE) Consider a file system in which a file can be deleted and its...
(Operating System CSE) Consider a file system in which a file can be deleted and its disk space reclaimed while links to that file still exist. What problems may occur if a new file is created in the same storage area or with the same absolute path name? How can these problems be avoided?2)Consider a file systemthat uses a modifiedcontiguous-allocation scheme with support for extents.A file is a collection of extents, with each extent corresponding to a contiguous set of...
Select a system engineering organization, identify the entry level requirements for the organization, and develop a...
Select a system engineering organization, identify the entry level requirements for the organization, and develop a set of descriptions for an individual at each skill level: basic, intermediate, and supervisory.
Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all...
Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all relevant aspects of the system. Aging is used to solve what problem in process scheduling? Explain how it solves it. What are Hardware Threads? In what way do they impact the Operating System? Regarding Mutex Locks and Semaphores: A process wishes to unlock a Mutex Lock entitled “EXCLUDE”. What command does it need to issue? A process requests use of a resource controlled by...
Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all...
Give an example of a Multi-Level Queue with Feedback system. Be sure to fully describe all relevant aspects of the system. Aging is used to solve what problem in process scheduling? Explain how it solves it. What are Hardware Threads? In what way do they impact the Operating System? Regarding Mutex Locks and Semaphores: A process wishes to unlock a Mutex Lock entitled “EXCLUDE”. What command does it need to issue? A process requests use of a resource controlled by...
1)Consider a file system in which a file can be deleted and its disk space reclaimed...
1)Consider a file system in which a file can be deleted and its disk space reclaimed while links to that file still exist. What problems may occur if a new file is created in the same storage area or with the same absolute path name? How can these problems be avoided? 2)Consider a file systemthat uses a modified contiguous-allocation scheme with support for extents.A file is a collection of extents, with each extent corresponding to a contiguous set of blocks....
Consider a multi-user system running a database server, with a role-based access control (RBAC) system. One...
Consider a multi-user system running a database server, with a role-based access control (RBAC) system. One role in this system is Database Developer, for those responsible for creating and populating new databases and database applications. A second role is Database Administrator, responsible for managing the configuration of the database server and database user accounts. Make two lists, one for each of these two roles, with names of permissions that might be assigned to each role. Be as specific as possible....
why use a multi-level experimental design?
why use a multi-level experimental design?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT