1Which of the following is NOT a standard file attribute maintained by the operating system?
A.Name
B.Location
C.Current file contents
D.Identifier
Correct Answer: Current file contents
Explanation:
Attributes are metadata about the file (name, size, location, protection, timestamps), whereas content is the actual data stored within the file.
Incorrect! Try again.
2In which file access method is information in the file processed in order, one record after the other?
A.Relative Access
B.Direct Access
C.Sequential Access
D.Indexed Access
Correct Answer: Sequential Access
Explanation:
Sequential access reads or writes data consecutively, much like a tape drive, starting from the beginning.
Incorrect! Try again.
3Which directory structure allows a user to create their own subdirectories and organizes files into a hierarchy?
A.Hash-structured directory
B.Flat directory
C.Single-level directory
D.Tree-structured directory
Correct Answer: Tree-structured directory
Explanation:
A tree-structured directory allows users to create subdirectories, resulting in a hierarchy of files and folders.
Incorrect! Try again.
4What is the specific operation called when a file system is attached to an existing directory structure?
A.Linking
B.Formatting
C.Spooling
D.Mounting
Correct Answer: Mounting
Explanation:
Mounting is the process of making a file system available to the system by attaching it to a specific point (mount point) in the directory tree.
Incorrect! Try again.
5Which allocation method suffers from external fragmentation?
A.Linked allocation
B.Hashed allocation
C.Indexed allocation
D.Contiguous allocation
Correct Answer: Contiguous allocation
Explanation:
Contiguous allocation requires files to occupy consecutive blocks. As files are deleted, gaps are created that may be too small for new files, leading to external fragmentation.
Incorrect! Try again.
6In Linked Allocation, what is the major disadvantage regarding file access?
A.It only supports efficient sequential access
B.It uses too much disk space for pointers
C.It requires a File Allocation Table (FAT)
D.It creates external fragmentation
Correct Answer: It only supports efficient sequential access
Explanation:
To find the 'i-th' block in linked allocation, the OS must traverse the pointers from the beginning, making direct (random) access very slow.
Incorrect! Try again.
7Which allocation method solves the external fragmentation problem and supports efficient direct access by bringing all pointers together into one block?
A.Linked allocation
B.Contiguous allocation
C.Dynamic allocation
D.Indexed allocation
Correct Answer: Indexed allocation
Explanation:
Indexed allocation uses an index block to hold pointers to all data blocks of a file, eliminating external fragmentation and allowing direct access.
Incorrect! Try again.
8A Bit Vector is used for which purpose in file management?
A.File protection
B.Free-space management
C.Directory implementation
D.File compression
Correct Answer: Free-space management
Explanation:
A Bit Vector (or Bit Map) is a method to track free disk blocks where each bit represents a block (0 for allocated, 1 for free, or vice-versa).
Incorrect! Try again.
9Which directory implementation method requires a linear search to find a file?
A.B+ Tree
B.Linear List
C.Hash Table
D.Indexed List
Correct Answer: Linear List
Explanation:
A Linear List implementation of a directory requires scanning the list of file names one by one to find a specific file, which can be slow for large directories.
Incorrect! Try again.
10What is the primary problem with using a Hash Table for directory implementation?
A.Linear search time
B.Collisions
C.Inability to store metadata
D.External fragmentation
Correct Answer: Collisions
Explanation:
Hash tables provide fast access, but collisions occur when two filenames hash to the same location, requiring collision resolution mechanisms.
Incorrect! Try again.
11Which of the following is a 'Dedicated Device'?
A.Tape Drive
B.Main Memory
C.CPU
D.Hard Disk Drive
Correct Answer: Tape Drive
Explanation:
Dedicated devices, like tape drives or plotters, are assigned to only one process at a time until the job is finished.
Incorrect! Try again.
12What technique allows a dedicated device (like a printer) to appear as a shared device?
A.Swapping
B.Polling
C.Caching
D.Spooling
Correct Answer: Spooling
Explanation:
Spooling (Simultaneous Peripheral Operations On-Line) buffers data to a disk area so that multiple processes can 'write' to the printer simultaneously without blocking, while a daemon prints them one by one.
Incorrect! Try again.
13In the context of device management, which devices transfer data one character at a time?
A.Block devices
B.Storage devices
C.Character devices
D.Network devices
Correct Answer: Character devices
Explanation:
Character devices (e.g., keyboards, mice, serial ports) transfer data as a stream of bytes/characters, unlike block devices which transfer in chunks.
Incorrect! Try again.
14What is the time taken for the disk arm to move the heads to the cylinder containing the desired sector called?
A.Response time
B.Rotational latency
C.Seek time
D.Transfer time
Correct Answer: Seek time
Explanation:
Seek time is the time required to move the disk arm to the required track/cylinder.
Incorrect! Try again.
15Which disk scheduling algorithm selects the request with the least seek time from the current head position?
A.FCFS
B.SSTF
C.SCAN
D.C-LOOK
Correct Answer: SSTF
Explanation:
Shortest Seek Time First (SSTF) selects the request closest to the current head position to minimize head movement.
Incorrect! Try again.
16What is a major disadvantage of the SSTF disk scheduling algorithm?
A.It may cause starvation of some requests
B.It causes head crashing
C.It is slower than FCFS
D.It is difficult to implement
Correct Answer: It may cause starvation of some requests
Explanation:
If new requests continually arrive near the current head position, requests far away may never be serviced (starvation).
Incorrect! Try again.
17Which disk scheduling algorithm is also known as the 'Elevator Algorithm'?
A.SSTF
B.SCAN
C.FCFS
D.C-SCAN
Correct Answer: SCAN
Explanation:
In SCAN, the disk arm starts at one end and moves toward the other, servicing requests as it goes, then reverses direction, similar to an elevator.
Incorrect! Try again.
18In C-SCAN disk scheduling, what happens when the head reaches the end of the disk?
A.It randomly jumps to a new cylinder
B.It reverses direction immediately and services requests
C.It stops and waits for new requests
D.It returns to the beginning without servicing requests on the return trip
Correct Answer: It returns to the beginning without servicing requests on the return trip
Explanation:
C-SCAN (Circular SCAN) treats the cylinders as a circular list. When it reaches the end, it immediately returns to the beginning to provide a more uniform wait time.
Incorrect! Try again.
19What is a Direct Access Storage Device (DASD)?
A.Magnetic Tape
B.Magnetic Disk
C.Keyboard
D.Punch Card
Correct Answer: Magnetic Disk
Explanation:
DASDs, like magnetic disks or SSDs, allow the system to access any block of data directly without reading preceding blocks.
Incorrect! Try again.
20Which hardware component is responsible for handling the details of specific device control and data transfer, offloading this work from the main CPU?
A.Cache
B.System Bus
C.I/O Channel / IOP
D.ALU
Correct Answer: I/O Channel / IOP
Explanation:
An I/O Channel or Input/Output Processor is a specialized processor that handles I/O operations, allowing the main CPU to continue processing other tasks.
Incorrect! Try again.
21What is the primary purpose of Inter Process Communication (IPC)?
A.To prevent processes from running simultaneously
B.To increase the CPU clock speed
C.To allow processes to exchange data and synchronize actions
D.To manage disk space allocation
Correct Answer: To allow processes to exchange data and synchronize actions
Explanation:
IPC mechanisms allow cooperating processes to share data, communicate information, and synchronize their execution.
Incorrect! Try again.
22Which of the following is NOT a standard IPC mechanism?
A.Fragmentation
B.Pipes
C.Message Passing
D.Shared Memory
Correct Answer: Fragmentation
Explanation:
Fragmentation is a memory or disk management issue, not a method for processes to communicate.
Incorrect! Try again.
23In the context of IPC, what is a 'Race Condition'?
A.When two processes communicate via a pipe
B.When a process runs faster than the CPU
C.When two processes try to read the same file
D.When the outcome of execution depends on the specific order in which access takes place
Correct Answer: When the outcome of execution depends on the specific order in which access takes place
Explanation:
A race condition occurs when multiple processes access and manipulate shared data concurrently, and the final result depends on the timing of their execution.
Incorrect! Try again.
24What is a fundamental characteristic of a standard (anonymous) Pipe?
A.It persists after the creating process terminates
B.It is unidirectional
C.It allows communication between unrelated processes
D.It is bidirectional by default
Correct Answer: It is unidirectional
Explanation:
Standard pipes provide a one-way flow of data. Data enters at the write end and exits at the read end.
Incorrect! Try again.
25What limitation applies to standard (anonymous) pipes?
A.They store data permanently on disk
B.They can only be used by processes with a common ancestor (parent-child)
C.They require a network connection
D.They are slower than message queues
Correct Answer: They can only be used by processes with a common ancestor (parent-child)
Explanation:
Anonymous pipes do not have a name in the filesystem, so they can only be shared by processes that inherit the file descriptors, typically a parent and child.
Incorrect! Try again.
26The popen() function in C library is used to:
A.Allocate shared memory
B.Create a pipe, fork a child, and invoke a shell
C.Open a file for direct access
D.Create a new thread
Correct Answer: Create a pipe, fork a child, and invoke a shell
Explanation:
popen() creates a pipe, forks a child process, and executes a shell command, connecting the command's input or output to the pipe.
Incorrect! Try again.
27Which function is used to close a stream opened by popen()?
A.exit()
B.close()
C.pclose()
D.fclose()
Correct Answer: pclose()
Explanation:
pclose() closes the I/O stream associated with the pipe and waits for the child command to terminate.
Incorrect! Try again.
28Which IPC method is generally considered the fastest?
A.Message Queues
B.Sockets
C.Pipes
D.Shared Memory
Correct Answer: Shared Memory
Explanation:
Shared memory is fastest because it avoids copying data between kernel space and user space; processes access the same memory region directly.
Incorrect! Try again.
29What is a mandatory requirement when using Shared Memory?
A.Synchronization mechanism
B.Network protocols
C.Serial access
D.Disk mounting
Correct Answer: Synchronization mechanism
Explanation:
Since multiple processes access the same memory, synchronization (like semaphores) is needed to prevent race conditions and ensure data consistency.
Incorrect! Try again.
30What is another name for a Named Pipe?
A.Signal
B.FIFO
C.LIFO
D.Socket
Correct Answer: FIFO
Explanation:
A Named Pipe is often called a FIFO (First In, First Out) because it behaves like a pipe but exists as a special file in the filesystem.
Incorrect! Try again.
31How does a FIFO differ from a standard Pipe?
A.FIFO allows bidirectional communication only
B.FIFO can only be used by a parent and child
C.FIFO exists as a device special file in the file system
D.FIFO is faster
Correct Answer: FIFO exists as a device special file in the file system
Explanation:
Unlike anonymous pipes, FIFOs have a name in the filesystem, allowing unrelated processes to communicate as long as they have appropriate permissions.
Incorrect! Try again.
32Which system call is typically used to create a FIFO?
A.mkfifo()
B.pipe()
C.shmget()
D.msgget()
Correct Answer: mkfifo()
Explanation:
mkfifo() is the system call used to create a named pipe (FIFO) in the filesystem.
Incorrect! Try again.
33In a Message Queue, how are messages typically retrieved?
A.Strictly FIFO only
B.By message type or priority
C.Randomly
D.By message size
Correct Answer: By message type or priority
Explanation:
Message queues allow processes to read messages not just in FIFO order, but often based on message type or priority.
Incorrect! Try again.
34Which protection mechanism involves associating a list of users and their access rights with each file?
A.Password protection
B.Capability Lists
C.Key locks
D.Access Control List (ACL)
Correct Answer: Access Control List (ACL)
Explanation:
An ACL is associated with a file and lists the users (or groups) and the specific access rights (read, write, execute) they have for that file.
Incorrect! Try again.
35In an Acyclic-Graph Directory structure, what is the main benefit over a Tree structure?
A.Faster searching
B.Smaller size
C.Ability to share files and subdirectories
D.No cycle detection required
Correct Answer: Ability to share files and subdirectories
Explanation:
Acyclic graphs allow directories to share subdirectories and files (via links), which is not possible in a strict tree structure.
Incorrect! Try again.
36What happens to a file in a 'DAG' directory structure if one of the links to it is deleted?
A.The file remains if other links exist
B.The file is deleted immediately
C.The file becomes hidden
D.The file system crashes
Correct Answer: The file remains if other links exist
Explanation:
In a shared directory structure (like DAG), deleting a link removes that reference. The actual file is usually only deleted when the reference count drops to zero.
Incorrect! Try again.
37Which file access pattern is best suited for CD-ROMs?
A.Sequential Access
B.Random Access
C.Write-only
D.Read-Write
Correct Answer: Sequential Access
Explanation:
While random access is possible, CD-ROM technology is optimized for sequential access of large streams of data (audio/video).
Incorrect! Try again.
38Group 'world' or 'others' in Unix file protection refers to:
A.The owner of the file
B.All users in the system other than owner and group
C.System Administrators only
D.Users in the same group as the owner
Correct Answer: All users in the system other than owner and group
Explanation:
Unix permissions are divided into Owner, Group, and Others (World).
Incorrect! Try again.
39What does the acronym NFS stand for?
A.New File System
B.Network Folder Service
C.Non-fragmented System
D.Network File System
Correct Answer: Network File System
Explanation:
NFS is a standard protocol for accessing files over a network.
Incorrect! Try again.
40In Free-Space Management, what is a disadvantage of the Linked List method?
A.It causes internal fragmentation
B.It requires traversing the list to find multiple free blocks
C.It is hard to implement
D.It wastes space
Correct Answer: It requires traversing the list to find multiple free blocks
Explanation:
While it doesn't waste space (pointers are stored in free blocks), finding a large number of continuous free blocks requires slow disk I/O to traverse the list.
Incorrect! Try again.
41Which device type is strictly sequential access?
A.Flash Drive
B.Magnetic Tape
C.Magnetic Disk
D.Solid State Drive
Correct Answer: Magnetic Tape
Explanation:
Magnetic tapes must be wound or rewound to reach a specific point, making them strictly sequential.
Incorrect! Try again.
42What is the role of the Device Controller?
A.To manage user logins
B.To compile code
C.To schedule processes
D.To interface between the OS and the device hardware
Correct Answer: To interface between the OS and the device hardware
Explanation:
The controller is the hardware component that understands the specific commands of the device and communicates with the OS via registers or bus.
Incorrect! Try again.
43Blocking I/O means:
A.The kernel crashes
B.The process continues while I/O executes
C.The I/O device is blocked
D.The process is suspended until I/O is completed
Correct Answer: The process is suspended until I/O is completed
Explanation:
In blocking I/O, the execution of the process is halted (placed in a wait queue) until the I/O operation finishes.
Incorrect! Try again.
44Which IPC method utilizes a kernel-managed linked list of messages?
A.Semaphores
B.Pipes
C.Message Queues
D.Shared Memory
Correct Answer: Message Queues
Explanation:
A message queue is stored by the kernel as a linked list of messages.
Incorrect! Try again.
45In File Management, what is an Absolute Path Name?
A.Path containing no spaces
B.Path starting from the root directory
C.Path starting from the current directory
D.Path of a hidden file
Correct Answer: Path starting from the root directory
Explanation:
An absolute path traces the file location starting all the way from the root of the file system (e.g., /home/user/file.txt).
Incorrect! Try again.
46What does the open() system call typically return?
A.The file size
B.A file handle or file descriptor
C.The file content
D.True or False
Correct Answer: A file handle or file descriptor
Explanation:
open() returns a small integer (file descriptor/handle) used in subsequent system calls to refer to that file.
Incorrect! Try again.
47Which disk scheduling algorithm is theoretically optimal but impossible to implement without knowing future requests?
A.SCAN
B.Shortest Seek Time First
C.FCFS
D.Look
Correct Answer: Shortest Seek Time First
Explanation:
While SSTF is implementable, a purely 'Optimal' policy would require knowing the future chain of requests to minimize total movement. Among standard dynamic algorithms, SSTF is a greedy approximation of optimal.
Incorrect! Try again.
48With respect to Directory Implementation, what is a Hash Table bucket?
A.A type of file
B.A trash can for deleted files
C.A list of entries that hash to the same value
D.A physical storage unit
Correct Answer: A list of entries that hash to the same value
Explanation:
In a hash table with chaining, a bucket contains the linked list of all directory entries that hashed to the same index.
Incorrect! Try again.
49The logic that prevents a user from reading another user's file is handled by:
A.Directory Structure
B.File Allocation Table
C.File Protection Mechanism
D.Disk Scheduling
Correct Answer: File Protection Mechanism
Explanation:
Protection mechanisms (permissions, ACLs) enforce rules regarding who can access which files.
Incorrect! Try again.
50What is the main function of a Control Unit in I/O systems?
A.Manage RAM
B.Execute arithmetic operations
C.Decode instructions and generate control signals for the device
D.Store data permanently
Correct Answer: Decode instructions and generate control signals for the device
Explanation:
The Control Unit directs the operation of the processor and devices by decoding instructions and managing signal flow.