Almost all MCQs of Computer

Operating System File System Solved MCQs


 Operating System File System Solved MCQs

In this section of Operating System’s Storage Management, it contains Operating System’s File Systems – File System Concepts MCQs (Multiple Choice Questions Answers).
 
This section covers below lists of topics
– File Concept MCQs
– File Attributes MCQs
– File Operations MCQs
– File Types MCQs
– File Structure MCQs
 

1.Which of the following is a named collection of related information that is recorded on secondary storage and is the smallest allotment of logical secondary storage?
  • Directory
  • File
  • Disk
  • All of the above
B. File Explanation :
2.In Which of the following is a sequence of characters organized into lines (and possibly pages) ?
  • Text file
  • Source file
  • Executable file
  • None of the above.
A. Text file
3.In which of the following a sequence of functions, each of which is further organized as declarations followed by executable statements is stored?
  • Text file
  • Source file
  • Executable file
  • All of the above.
B. Source file
4.In which of the following file is a series of code sections that the loader can bring into memory and execute?
  • Text file
  • Source file
  • Executable file
  • Distributed file
C. Executable file
5.A file is named, for the convenience of its human users, and is referred to by its ______
  • Name
  • Type
  • Identifier
  • size
A. Name
6.Which of the following file attribute is the unique tag, usually a number, identifies the file within the file system; it is the non-human-readable name for the file?
  • Name
  • Identifier
  • Size
  • Location
B. Identifier
7.Which of the following file attribute information is needed for systems that support different types of files?
  • Name
  • Type
  • Identifier
  • size
B. Type
8.Which of the following file attribute a information is a pointer to a device and to the location of the file on that device?
  • Name
  • Size
  • Time, date, and user identification.
  • Location
D. Location
9.Which of the following file attribute, the current size of the file (in bytes, words, or blocks) and possibly the maximum allowed size are included?
  • Protection
  • Size
  • Identifier
  • Type
B. Size
10.Which of the following file attribute Access-control information determines who can do reading, writing, executing, and so on?
  • Protection
  • identifier
  • Type
  • Time, date, and user identification
A. Protection
11.The information about all files is kept in the ________ which also resides on secondary storage.
  • Disk structure
  • Directory structure
  • Array structure
  • All of the above
B. Directory structure Explanation :
12.Which of following basic operations that can be performed on files by the operating System’s system calls?
  • Read, Write, Delete
  • Write, Paint, reposition
  • Delete, truncate files, Sorting
  • All of the above.
A. Read, Write, Delete Explanation :
13.Which of the following steps are necessary to create a file?
  • space in the file system must be found for the file
  • an entry for the new file must be made in the directory
  • space in the file system must be found for the file and an entry for the new file must be made in the directory
  • None of the above.
C. space in the file system must be found for the file and an entry for the new file must be made in the directory
14.Which of the following file operation is also known as file seek?
  • Truncating a file
  • Deleting a file
  • Repositioning within a file
  • Reading a file
C. Repositioning within a file Explanation :
15.Which of the following Statements stands true for creating a file?
  • We search the directory for the named file. Having found the associated directory entry, we release all file space, so that it can be reused by other files, and erase the directory entry.
  • The directory is searched for the appropriate entry, and the current-file-position pointer is re-positioned to a given value.
  • Space in the file system must be found for the file and an entry for the new file must be made in the directory.
  • We use a system call that specifies the name of the file and where (in memory) the next block of the file should be put. Again, the directory is searched for the associated entry, and the system needs to keep a read pointer to the location in the file where the next read is to take place.
C. Space in the file system must be found for the file and an entry for the new file must be made in the directory.
16.Which of the following Statements stands true for writing a file?
  • Given the name of the file, the system searches the directory to find the file’s location. The system must keep a write pointer to the location in the file where the next write is to take place. The write pointer must be updated whenever a write occurs.
  • The directory is searched for the appropriate entry, and the current-file-position pointer is re positioned to a given value.
  • space in the file system must be found for the file and an entry for the new file must be made in the directory.
  • We use a system call that specifies the name of the file and where (in memory) the next block of the file should be put. Again, the directory is searched for the associated entry, and the system needs to keep a read pointer to the location in the file where the next read is to take place.
A. Given the name of the file, the system searches the directory to find the file’s location. The system must keep a write pointer to the location in the file where the next write is to take place. The write pointer must be updated whenever a write occurs.
17.Which of the following Statements stands true for Reading a file?
  • Given the name of the file, the system searches the directory to find the file’s location. The system must keep a write pointer to the location in the file where the next write is to take place. The write pointer must be updated whenever a write occurs.
  • We search the directory for the named file. Having found the associated directory entry, we release all file space, so that it can be reused by other files, and erase the directory entry.
  • space in the file system must be found for the file and an entry for the new file must be made in the directory.
  • We use a system call that specifies the name of the file and where (in memory) the next block of the file should be put. Again, the directory is searched for the associated entry, and the system needs to keep a read pointer to the location in the file where the next read is to take place.
D. We use a system call that specifies the name of the file and where (in memory) the next block of the file should be put. Again, the directory is searched for the associated entry, and the system needs to keep a read pointer to the location in the file where the next read is to take place.
18.Which of the following Statements stands true for deleting a file?
  • Given the name of the file, the system searches the directory to find the file’s location. The system must keep a write pointer to the location in the file where the next write is to take place. The write pointer must be updated whenever a write occurs.
  • We search the directory for the named file. Having found the associated directory entry, we release all file space, so that it can be reused by other files, and erase the directory entry.
  • Space in the file system must be found for the file and an entry for the new file must be made in the directory.
  • We use a system call that specifies the name of the file and where (in memory) the next block of the file should be put. Again, the directory is searched for the associated entry, and the system needs to keep a delete pointer to the location in the file where the next read is to take place.
B. We search the directory for the named file. Having found the associated directory entry, we release all file space, so that it can be reused by other files, and erase the directory entry.
19.Which of the following Statements stands true for truncating a file?
  • We search the directory for the named file. Having found the associated directory entry, we release all file space, so that it can be reused by other files, and erase the directory entry.
  • The directory is searched for the appropriate entry, and the current-file-position pointer is re-positioned to a given value.
  • Space in the file system must be found for the file and an entry for the new file must be made in the (directory).
  • The user may want to erase the contents of a file but keep its attributes. Rather than forcing the user to delete the file and then recreate it, this function allows all attributes to remain unchanged—except for file length—but lets the file be reset to length zero and its file space released.
D. The user may want to erase the contents of a file but keep its attributes. Rather than forcing the user to delete the file and then recreate it, this function allows all attributes to remain unchanged—except for file length—but lets the file be reset to length zero and its file space released.
20.The operating system keeps a table, called the _______, containing information about all open files.
  • per-process table
  • system-wide table
  • Open-file table
  • A and C
D. A and C Explanation :
21.The _______________needed to locate the file on disk is kept in memory so that the system does not have to read it from disk for each operation.
  • File pointer
  • File-open count
  • Disk location of the file.
  • Access rights
C. Disk location of the file.
22.This ________ is stored on the per-process table so the operating system can allow or deny subsequent I/O requests.
  • File pointer
  • File-open count
  • Disk location of the file.
  • Access rights
D. Access rights
23.______ tracks the number of opens and closes and reaches zero on the last close.The system can then remove the entry.
  • File pointer
  • File-open count
  • Disk location of the file.
  • Access rights
B. File-open count Explanation :
24.______ is unique to each process operating on the file and therefore must be kept separate from the on-disk file attributes.
  • File pointer
  • File-open count
  • Disk location of the file.
  • Access rights
A. File pointer Explanation :
25._____ is akin to a reader lock in that several processes can acquire the lock concurrently.
  • Exclusive file lock
  • Shared file lock
  • Inclusive lock
  • Mandatory lock
B. Shared file lock
26.An __________ behaves like a writer lock;only one process at a time can acquire such a lock.
  • Exclusive file lock
  • Shared file lock
  • Inclusive file lock
  • Mandatory file lock
A. Exclusive file lock
27.If a lock is ______, then once a process acquires an exclusive lock, the operating system will prevent any other process from accessing the locked file
  • Exclusive file lock
  • Shared file lock
  • Inclusive file lock
  • Mandatory file lock
D. Mandatory file lock
28.The system uses the _______ to indicate the type of the file and the type of operations that can be done on that file.
  • Size
  • Location
  • Date time
  • Extension
D. Extension
29.A file with extension______ is the binary executable file.
  • .txt
  • .docx
  • .sh
  • .exe
D. .exe
30.Which of the following file with extension ______is the binary executable file?
  • .txt
  • .docx
  • .sh
  • .com
D. .com
31._________ is a shell script containing, in ASCII format, commands to the operating system.
  • .txt
  • .docx
  • .sh
  • .com
C. .sh
32.binary file containing audio or A/V information
  • exe, com, bin or none
  • c, cc, java, perl, asm
  • xml, html, tex
  • mpeg, mov, mp3, mp4, avi
D. mpeg, mov, mp3, mp4, avi
33.related files grouped into one file, sometimes compressed, for archiving or storage
  • exe, com, bin or none
  • rar, zip, tar
  • xml, html, tex
  • mpeg, mov, mp3, mp4, avi
B. rar, zip, tar
34.libraries of routines for programmers
  • exe, com, bin or none
  • rar, zip, tar
  • xml, html, tex
  • lib, a, so, dll
D. lib, a, so, dll
35.which of the following are various word-processor formats?
  • exe, com, bin or none
  • rar, zip, tar
  • xml, html, tex
  • xml, rtf, docx
D. xml, rtf, docx
36.Which of the following has the file type of markup?
  • exe, com, bin or none
  • rar, zip, tar
  • xml, html, tex
  • xml, rtf, docx
C. xml, html, tex
37.Which of the following is known as batch file?
  • exe, com, bin or none
  • obj, o
  • lib, a, so, dll
  • bat, sh
D. bat, sh
38.Which of the following file extension is for the file containing source code in various languages?
  • exe, com, bin or none
  • obj, o
  • lib, a, so, dll
  • c, cc, java, perl
D. c, cc, java, perl
39.________file extension has the function of compiled, machine language, not linked.
  • exe, com, bin or none
  • obj, o
  • lib, a, so, dll
  • c, cc, java, perl
B. obj, o
40.________file extension contain ready-to-run machine language program.
  • exe, com, bin or none
  • obj, o
  • lib, a, so, dll
  • c, cc, java, perl
A. exe, com, bin or none

 

1.Information in the file is processed in order, one record after the other.
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • All of the above.
B. Sequential Access Methods
2.A file is made up of fixed-length logical records that allow programs to read and write records rapidly in no particular order.
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • All of the above.
A. Direct Access Methods
3.Disks allow random access to any file block In_________
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • Indexed sequential-access method.
A. Direct Access Methods Explanation :
4.The file operations read operation—read next()—reads the next portion of the file and automatically advances a file pointer. Similarly, the write operation—write next() in____________
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • Indexed sequential-access method.
B. Sequential Access Methods
5.The file operations must be modified to include the block number as a parameter. Thus, we have read(n), where is the block number, rather than read next(), and write(n) rather than write next() in__________
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • Indexed sequential-access method.
A. Direct Access Methods
6.In a Tape Drive Which of the following Access method is suitable for accessing records?
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • Indexed sequential-access method.
B. Sequential Access Methods Explanation :
7.In a Disk drive which of the following Access method is suitable for accessing records?
  • Direct Access Methods
  • Sequential Access Methods
  • Logical Access Methods
  • Both Direct and Sequential Access Method
D. Both Direct and Sequential Access Method Explanation :
8.In a ___________ to locate a desired record, the access method module for this organization searches an index to identify a section of the disk that may contain the record, and searches the record in a file sequentially.
  • Direct Access Methods
  • Sequential Access Methods
  • Index Sequential Access Methods
  • Both Direct and Sequential Access Method
C. Index Sequential Access Methods
9.Which of the following techniques reads records of an input file ahead of the time when they are needed by a process and holds them temporarily in the memory area?
  • Buffering of records
  • Blocking of records
  • Buffering and blocking of records
  • None of the above.
A. Buffering of records Explanation :
10.Which of the following techniques always reads or writes a large block of data, which contains several file records, from or to the I/O medium?
  • Buffering of records
  • Blocking of records
  • Buffering and blocking of records
  • None of the above.
B. Blocking of records Explanation :

 

Post a Comment

[facebook]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget