File-System Interface Ch.13 Test Bank Docx Silberschatz - Operating System Concepts 10e Complete Test Bank by Abraham Silberschatz. DOCX document preview.
Chapter 13
Multiple Choice Questions
1. File’s _______ is a unique tag identifies the file within the file system.
A. type
B. location
C. identifier
D. name
Feedback: 13.1.1
Difficulty: Easy
2. What steps are necessary to create a file?
A. allocating a space in the file system
B. making an entry for the file in the directory
C. all of the above
D. none of the above
Feedback: 13.1.2
Difficulty: Easy
3. What pointer is used for writing a file?
A. memory pointer
B. seek pointer
C. shared--file pointer
D. current-file-position pointer
Feedback: 13.1.2
Difficulty: Easy
4. With _______ locking, once a process acquires an exclusive lock, the operating system will prevent any other process from accessing the locked file.
A. temporary
B. mandatory
C. shared
D. exclusive
Feedback: 13.1.2
Difficulty: Medium
5. Some binary files can include a magic number. This mechanism is used by __________.
A. MS Windows
B. UNIX
C. macOS
D. JavaVM
Feedback: 13.1.3
Difficulty: Medium
6. Because all file systems suffer from internal fragmentation, the following relation is true:
A. the larger block size, the greater the internal fragmentation
B. the smaller block size, the greater the internal fragmentation
C. the larger block size, the smaller internal fragmentation
D. there is no relation between block size and internal fragmentation
Feedback: 13.1.5
Difficulty: Medium
7. IBM’s indexed sequential access method (ISAM)__________________________.
A. uses an index file for sequential access
B. uses a small master index (kept in memory) that points to disk blocks of a secondary index, while the secondary index blocks point to the actual file blocks
C. use the pointers (kept in memory) of the actual file blocks
D. uses the pointers (kept in memory) that points to disk blocks of a master index which points to disk blocks of a secondary index, while the secondary index blocks point to the actual file blocks
Feedback: 13.2.3
Difficulty: Hard
8. In the two-level directory, if a user refers to a particular file then__________________
A. only his/her own UFD (user file directory) is searched
B. only MFD (master file directory) is searched
C. first UFD (user file directory) is searched, then MFD (master file directory)
D. first MFD (master file directory) is searched, then UFD (user file directory)
Feedback: 13.3.2
Difficulty: Medium
9. A two-level directory can be thought as a tree of height _________
A. 2 and its root is UFD
B. 1 and its root is MFD
C. 2 and its root is MFD
D. 1 and its root is UFD
Feedback: 13.3.2
Difficulty: Easy
10. The current directory is
A. always included in the search path
B. represented by the symbol “..”
C. may be included in the search path
D. none of the above
Feedback: 13.3.3
Difficulty: Easy
11. A relative path name defines a path from_________________________
A. the root directory
B. the current directory
C. from the UFD (user file directory)
D. from the MFD (master file directory)
Feedback: 13.3.3
Difficulty: Easy
12. Acyclic-graph directory structure_______________________
A. prohibits the sharing of files and directories
B. prohibits the sharing of files, but allows to share directories
C. allows to share files and directories
D. allows the sharing of files, but prohibits to share directories
Feedback: 13.3.4
Difficulty: Easy
13. In the case of UNIX, where sharing is implemented by symbolic link________________________
A. the deletion of link does not affect the original file
B. the deletion of the original file does not remove the link, but it is dangling
C. both of the above
D. none of the above
Feedback: 13.3.4
Difficulty: Medium
14. The garbage collection is necessary _____
A. in each implementation of the directory structure
B. in tree-based directory structure only
C. in acyclic-graph directory structure only
D. in general graph directory structure only
Feedback: 13.3.5
Difficulty: Medium
15. ACL (access-control list) is associated with each file and directory. It
A. specifies user names and types of access allowed for each of them
B. includes user names only
C. includes types of access allowed for the file only
D. contains user names and their encrypted passwords
Feedback: 13.4.1
Difficulty: Easy
16. The following information is presented for the prog.c
-rwxr-xr-- 1 Jim staff 130 May 25 22:13 prog.c
Users Jim, Sara and Mike are the members of the group staff
A. Jim can invoke read and execute operation on prog.c
B. Mike can read and write to prog.c
C. Alan can read prog.c
D. Sara can modify prog.c
Feedback: 13.4.2
Difficulty: Medium
17. Manipulating files through memory rather than using the read() and write() system calls_________________
A. simplifies, but retards file access and usage
B. simplifies and speeds up file access and usage
C. is not recommended for single-processor operating systems
D. complicates, but retards file access and usage
Feedback: 13.5.1
Difficulty: Medium
18. If a current directory is /home/user/jane and then the propose path to file /home/user/mike/prog.c is_____________________
A. ./mike/prog.c
B. ../../mike/prog.c
C. ../mike/prog.c
D. /mike/prog.c
Feedback: 13.3.3
Difficulty: Medium
19. close() operation _____ an open count associated with a given file.
A. decreases
B. increases
C. resets
D. does not change
Feedback: 13.1.2
Difficulty: Easy
20. UNIX systems employ ________________________
A. two-level tree directory
B. general graph directory
C. single-level directory
D. acyclic-graph directory
Feedback: 13.3.4
Difficulty: Easy
21. When the exclusive lock is applied to a file then _____________
A. only one process can use this file
B. only one process can write to this file, but many processes can read it concurrently
C. many processes can read and write to this file concurrently
D. processes can write to this file only
Feedback: 13.1.2
Difficulty: Medium
22. When the shared lock is applied to a file then ____________
A. several processes can acquire the lock concurrently
B. only one process can use this file
C. many processes can read and write to this file concurrently
D. many processes can write to this file concurrently
Feedback: 13.1.2
Difficulty: Medium
23. UNIX systems consider ach file to be a sequence of _______________
A. bit words, which length is defined by the users
B. 16 bit words
C. 8-bit bytes
D. 32 bit words
Feedback: 13.1.4
Difficulty: Medium
24. The file protection can be provided by:
A. access-control list
B. password
C. knowledge of the existence and name of a file
D. all of the above
Feedback: 13. 4
Difficulty: Medium
Essay Questions
1. Why is open() call implemented?
Feedback: 13.1.1
Difficulty: Easy
2. What are the differences between per-process open-file table and a system-wide open-file table?
Feedback: 13.1.2
Difficulty: Medium
3. Why information about the location of the file is kept in memory?
Feedback: 13.1.2
Difficulty: Medium
4. What is the reason to design an operating system which recognizes the type of a file?
Feedback: 13.1.3
Difficulty: Easy
5. What is the main disadvantage of having the operating system support multiple file structures?
Feedback: 13.1.4
Difficulty: Medium
6. What does it mean internal fragmentation associated with the internal file structure?
Feedback: 13.1.5
Difficulty: Medium
7. Is it possible that read_next() operation is used in direct access method?
Feedback: 13.2.2
Difficulty: Medium
8. Describe the main drawback of single-level directory structure
Feedback: 13.3.1
Difficulty: Easy
9. What is the internal representation of a directory in tree-structured directory?
each directory entry defines the entry as a file (0) or as a subdirectory (1). Special system calls are used to create and delete directories.
Feedback: 13.3.3
Difficulty: Easy
10. Describe the file protection method use by the UNIX system.
Ans. In the UNIX system, three fields (owner, group, universe) are associated with each file or directory. Each field consists of the three bits rwx, where r controls read access, w controls write access, and x controls execution.
Feedback: 13.4.2
Difficulty: Easy
11. What are the main disadvantages of associating a password with each file?
making the scheme impractical; (2) if only one password is used for all the files, then once it is discovered, all files are accessible; protection is on an all-or-none basis.
Feedback: 13.4.2
Difficulty: Easy
12. How does MS Windows API implement shared memory using memory-mapped files?
Feedback: 13.5.2
Difficulty: Medium
True/False Questions
1. Is the set of the file’s attributes the same for each operating system?
Feedback: 13.1.1
Difficulty: Easy
2. Reading and writing a file operations use the same current-file-position pointer.
Feedback: 13.1.2
Difficulty: Easy
3. Truncating a file operation resets values of all its attributes and releases its file space.
Feedback: 13.1.2
Difficulty: Medium
4. create() system call uses open-file table.
Feedback: 13.1.2
Difficulty: Medium
5. Is an extension a part of a file name?
Feedback: 13.1.3
Difficulty: Easy
6. All operating systems have to support at least one file structure.
Feedback: 13.1.4
Difficulty: Easy
7. The length of a logical record is fixed for a given operating system.
Feedback: 13.1.5
Difficulty: Medium
8. All file systems suffer from internal fragmentation.
Feedback: 13.1.5
Difficulty: Medium
9. Sequential access to a file is based on a disk model of a file.
Feedback: 13.2.1
Difficulty: Easy
10. In two-level directory structure, the system’s master file directory (MFD) is searched when a user logs in.
Feedback: 13.3.2
Difficulty: Easy
11. In tree-structured directory the search path always contains “the current directory”
Feedback: 13.3.3
Difficulty: Medium
12.UNIX rm command can delete non-empty directory
Feedback: 13.3.3
Difficulty: Medium
13.Systems that do not permit access to the files of another user do not need protection
Feedback: 13.4.1
Difficulty: Easy
14. Writes to the file mapped in memory are not necessarily immediate writes to the file on disk
Feedback: 13.5.1
Difficulty: Medium
Document Information
Connected Book
Operating System Concepts 10e Complete Test Bank
By Abraham Silberschatz