Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unix provides two mechanisms to link one file to another, hard links and soft links. With hard links, assume that the directory entry for the

Unix provides two mechanisms to link one file to another, hard links and soft links. With hard links, assume that the directory entry for the link maps the link file name to the inode for the file to which it is linked. With soft links, assume that the directory entry for the link maps the link file name to the file name of the file to which it is linked. Consider the situation where we want to create a link /bin/ls to the existing file /sbin/ls. In this case, /bin/ls is the link file name and /sbin/ls is the file to which it is linked. For the questions below, assume that, each time Unix has to retrieve information from the disk, it takes only one disk read operation. (a) First, succinctly describe what steps Unix will take, in terms of the disk data structures it must read, in order to resolve the path name /sbin/ls so that it can read the first byte of the file. (b) How many disk reads will be required to resolve the path name and read the first byte of the file /sbin/ls? (c) Consider when we use a hard link to link /bin/ls to /sbin/ls. Succinctly describe the steps required to read the first byte of /sbin/ls starting with the link /bin/ls. How many disk reads will it require? (d) Consider when we use a soft link to link /bin/ls to /sbin/ls. Succinctly describe the steps required to read the first byte of /sbin/ls starting with the link /bin/ls. How many disk reads will it require? (e) Unix maintains a reference count of the number of hard links to a file, and it only removes a files blocks on disk when this count reaches zero. If we remove the file /bin/ls, is the hard link still valid? Is the soft link still valid?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

Students also viewed these Databases questions

Question

What would your clients like you to do more of/less of?

Answered: 1 week ago

Question

Identification of key stakeholders and decision makers

Answered: 1 week ago