• Home
  • Textbooks
  • Operating System Concepts Essentials
  • File-System Interface

Operating System Concepts Essentials

Abraham Silberschatz, Peter B. Galvin, Greg Gagne

Chapter 9

File-System Interface - all with Video Answers

Educators


Chapter Questions

Problem 1

Some systems automatically delete all user files when a user logs off or a job terminates, unless the user explicitly requests that they be kept; other systems keep all files unless the user explicitly deletes them. Discuss the relative merits of each approach.

Check back soon!

Problem 2

Why do some systems keep track of the type of a file, while others leave it to the user and still others simply do not implement multiple file types? Which system is "better?"

Check back soon!
03:45

Problem 3

Similarly, some systems support many types of structures for a file's data, while others simply support a stream of bytes. What are the advantages and disadvantages of each approach?

Foster Wisusik
Foster Wisusik
Numerade Educator

Problem 4

Can you simulate a multilevel directory structure with a single-level directory structure in which arbitrarily long names can be used? If your answer is yes, explain how you can do so, and contrast this scheme with the multilevel directory scheme. If your answer is no, explain what prevents your simulation's success. How would your answer change if file names were limited to seven characters?

Check back soon!

Problem 5

Explain the purpose of the open() and close() operations.

Check back soon!

Problem 6

Give an example of an application in which data in a file should be accessed in the following order:
a. Sequentially
b. Randomly

Check back soon!

Problem 7

In some systems, a subdirectory can be read and written by an authorized user, just like ordinary files.
a. Describe the protection problems that could arise.
b. Suggest a scheme for dealing with each of these protection problems.

Check back soon!

Problem 8

Consider a system that supports 5,000 users. Suppose that you want to allow 4,990 of these users to be able to access one file.
a. How would you specify this protection scheme in UNIX?
b. Can you suggest another protection scheme that can be used more effectively for this purpose than the scheme provided by UNIX?

Check back soon!

Problem 9

Researchers have suggested that, instead of having an access list associated with each file (specifying which users can access the file, and how), we should have a user control list associated with each user (specifying which files a user can access, and how). Discuss the relative merits of these two schemes.

Check back soon!
02:06

Problem 10

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?

Adam Conner
Adam Conner
Numerade Educator
01:54

Problem 11

The open-file table is used to maintain information about files that are currently open. Should the operating system maintain a separate table for each user or just maintain one table that contains references to files that are currently being accessed by all users? If the same file is being accessed by two different programs or users, should there be separate entries in the open-file table?

Adam Conner
Adam Conner
Numerade Educator

Problem 12

What are the advantages and disadvantages of providing mandatory locks instead of advisory locks whose usage is left to users' discretion?

Check back soon!

Problem 13

What are the advantages and disadvantages of recording the name of the creating program with the file's attributes (as is done in the Macintosh operating system)?

Check back soon!
03:21

Problem 14

Some systems automatically open a file when it is referenced for the first time and close the file when the job terminates. Discuss the advantages and disadvantages of this scheme compared with the more traditional one, where the user has to open and close the file explicitly.

RO
Reynald Oliveria
Numerade Educator

Problem 15

If the operating system knew that a certain application was going to access file data in a sequential manner, how could it exploit this information to improve performance?

Check back soon!

Problem 16

Give an example of an application that could benefit from operatingsystem support for random access to indexed files.

Check back soon!

Problem 17

Discuss the advantages and disadvantages of supporting links to files that cross mount points (that is, the file link refers to a file that is stored in a different volume).

Check back soon!
View

Problem 18

Some systems provide file sharing by maintaining a single copy of a file; other systems maintain several copies, one for each of the users sharing the file. Discuss the relative merits of each approach.

James Kiss
James Kiss
Numerade Educator

Problem 19

Discuss the advantages and disadvantages of associating with remote file systems (stored on file servers) a set of failure semantics different from that associated with local file systems.

Check back soon!

Problem 20

What are the implications of supporting UNIX consistency semantics for shared access for files stored on remote file systems?

Check back soon!