EECS 1012 Lecture Notes - Lecture 10: Hard Link, Inode
EECS 1012 Lecture 10 Notes
Introduction
File temporarily
• Under certain conditions, the changes made by user 2 will destroy the changes made by
user 1.
• A system for locking the file temporarily to prevent this type of error is required.
• Further discussion of locking is outside the scope.
• As you can see, there are difficulties and dangers in providing and using acyclic-graph
directories.
• Many system designers feel that the advantages outweigh the disadvantages, however.
• UNIX and the Macintosh both support acyclic-graph directories.
• Macintosh links are called aliases.
• The Macintosh uses a simple implementation.
• An alias is a hard-coded link that points to the original file.
• If the original file is moved or deleted, use of the link will cause an error.
• The Macintosh does not check for the presence of cycles
• However, the visual nature of the Macintosh interface makes cycles less likely to occur
and less problematic.
• The search operations that can cause loops are instead performed visually, and there is
no reason for the user to continue opening folders beyond a point of usefulness.
• Windows implements links similarly with shortcuts.
• UNIX provides two different kinds of links.
• The difference between them is shown
• A hard link points from a new directory entry to the same i-node as another directory
entry somewhere in the file system.
• Since both entries point to the same i-node, any changes made in the file are
automatically reflected to both.
find more resources at oneclass.com
find more resources at oneclass.com
ammarmarta2020 and 40175 others unlocked
10
EECS 1012 Full Course Notes
Verified Note
10 documents